# DB Uptime and Virtual CPU not showing on PMM Dashboard

**URL:** https://forums.percona.com/t/db-uptime-and-virtual-cpu-not-showing-on-pmm-dashboard/16177
**Category:** Percona Monitoring and Management (PMM)
**Tags:** pmm, mysql
**Created:** [June 17, 2022, 3:27am UTC](https://forums.percona.com/t/db-uptime-and-virtual-cpu-not-showing-on-pmm-dashboard/16177 "2022-06-17T03:27:20Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Stan\_beta](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@Stan\_beta](https://forums.percona.com/u/Stan_beta)
#### Post date: [June 17, 2022, 3:27am UTC](https://forums.percona.com/t/db-uptime-and-virtual-cpu-not-showing-on-pmm-dashboard/16177/1 "2022-06-17T03:27:20Z")

</div>

Dear All,

I’m new to using Percona Monitoring and Management,  
I was succeeded on installing PMM from VM (.ova) for version 2.26 and upgraded to 2.28 from the dashboard today.  
Last week, I added the PMM-agent in our MySQL 8 on CentOS 7 server, and adding the mysql services.  
Although the agent and service added successfully and the data can be seen on the PMM dashboard, but for the Virtual CPU and DB Uptime are still shown as N/A.

Is there any clue or things that I need to check so we can also monitor these value?

Regards,

Stan

---

<div class="post-metadata">

### Author: ![Ivan\_Groenewold](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ivan_groenewold/32/6299_2.png) [@Ivan\_Groenewold](https://forums.percona.com/u/Ivan_Groenewold)
#### Post date: [June 17, 2022, 11:21am UTC](https://forums.percona.com/t/db-uptime-and-virtual-cpu-not-showing-on-pmm-dashboard/16177/2 "2022-06-17T11:21:56Z")

</div>

Hello, the Virtual CPU is based on the node\_cpu\_seconds\_total metric, and the DB uptime on the mysql\_global\_status\_uptime metric. Can you go to Metrics explorer section and verify these are present for the host?

---

<div class="post-metadata">

### Author: ![Stan\_beta](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@Stan\_beta](https://forums.percona.com/u/Stan_beta)
#### Post date: [June 20, 2022, 4:05am UTC](https://forums.percona.com/t/db-uptime-and-virtual-cpu-not-showing-on-pmm-dashboard/16177/3 "2022-06-20T04:05:03Z")

</div>

Hello Igroene,

Sorry for the late reply and thank you very much for responding to my question.

But, where can I access the Metrics exploler? Is that from the Server Admin - Setting section?  
or is it from Data Source - Metrics?

Regards,

---

<div class="post-metadata">

### Author: ![Ivan\_Groenewold](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ivan_groenewold/32/6299_2.png) [@Ivan\_Groenewold](https://forums.percona.com/u/Ivan_Groenewold)
#### Post date: [June 21, 2022, 11:02am UTC](https://forums.percona.com/t/db-uptime-and-virtual-cpu-not-showing-on-pmm-dashboard/16177/4 "2022-06-21T11:02:04Z")

</div>

Hi, you can get to Metrics explorer by clicking on the icon from the left bar that looks like a compass then “Explore”

---

<div class="post-metadata">

### Author: ![Stan\_beta](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@Stan\_beta](https://forums.percona.com/u/Stan_beta)
#### Post date: [June 22, 2022, 8:59am UTC](https://forums.percona.com/t/db-uptime-and-virtual-cpu-not-showing-on-pmm-dashboard/16177/5 "2022-06-22T08:59:23Z")

</div>

Hello,

Thank you for the tips,

When I explore metrics for node\_cpu\_seconds\_total and mysql\_global\_status\_uptime, then execute/run query, PMM gave me the result of the query for both metrics for the PMM server and also for the mysql server node that shown as N/A.  
But why does the value does not shown on the dashboard?

---

<div class="post-metadata">

### Author: ![Ivan\_Groenewold](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ivan_groenewold/32/6299_2.png) [@Ivan\_Groenewold](https://forums.percona.com/u/Ivan_Groenewold)
#### Post date: [June 22, 2022, 11:39am UTC](https://forums.percona.com/t/db-uptime-and-virtual-cpu-not-showing-on-pmm-dashboard/16177/6 "2022-06-22T11:39:59Z")

</div>

If the metrics are present then I suspect some kind of issue with the template variables. The full expression for the Virtual CPUs panel is:

`(count(node_cpu_seconds_total{node_name=~"$node_name",mode=~"user"})`

does this populate correctly in metrics explorer when you replace $node\_name with your server?

---

<div class="post-metadata">

### Author: ![Stan\_beta](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@Stan\_beta](https://forums.percona.com/u/Stan_beta)
#### Post date: [June 22, 2022, 2:22pm UTC](https://forums.percona.com/t/db-uptime-and-virtual-cpu-not-showing-on-pmm-dashboard/16177/7 "2022-06-22T14:22:00Z")

</div>

Hi,

I tried the query you suggested, and it resulted in error below,  
(the node\_name is labinfra, which is show when i executed the node\_cpu\_seconds\_total metrics)

query : (count(node\_cpu\_seconds\_total{node\_name=~“$node\_name”,mode=~“user”})  
result :  
422: error when executing query=“(count(node\_cpu\_seconds\_total{node\_name=~"labinfra",mode=~"user"})” on the time range (start=1653314400000, end=1655906400000, step=1800000): cannot execute query: parensExpr: unexpected token “”; want “,” or “)”; unparsed data:

even if i change the node\_name with “pmm-server” which shown the DB uptime and virtual CPU on the dashboard, still resulted in the same error

---

<div class="post-metadata">

### Author: ![Ivan\_Groenewold](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ivan_groenewold/32/6299_2.png) [@Ivan\_Groenewold](https://forums.percona.com/u/Ivan_Groenewold)
#### Post date: [June 22, 2022, 2:29pm UTC](https://forums.percona.com/t/db-uptime-and-virtual-cpu-not-showing-on-pmm-dashboard/16177/8 "2022-06-22T14:29:13Z")

</div>

Sorry try removing the leading `(` like this:

`count(node_cpu_seconds_total{node_name=~"labinfra",mode=~"user"})`

---

<div class="post-metadata">

### Author: ![Stan\_beta](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@Stan\_beta](https://forums.percona.com/u/Stan_beta)
#### Post date: [June 23, 2022, 1:43am UTC](https://forums.percona.com/t/db-uptime-and-virtual-cpu-not-showing-on-pmm-dashboard/16177/9 "2022-06-23T01:43:17Z")

</div>

ah ok,  
now the result shows for all the node\_name i have.

and also, sometime there was a warning/an error that says something about template, but i could not get the full error description, would they be written on the percona log?  
Is it related to the problem i got?

---

<div class="post-metadata">

### Author: ![Stan\_beta](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@Stan\_beta](https://forums.percona.com/u/Stan_beta)
#### Post date: [July 7, 2022, 2:58am UTC](https://forums.percona.com/t/db-uptime-and-virtual-cpu-not-showing-on-pmm-dashboard/16177/10 "2022-07-07T02:58:39Z")

</div>

Hello? Any help?

So I can see all the indicator on the dashboard in a normal manner?
