# PMM - Query Analytics

**URL:** <https://forums.percona.com/t/pmm-query-analytics/35988>\
**Category:** Database Monitoring and Management\
**Created:** [January 6, 2025, 5:59pm UTC](https://forums.percona.com/t/pmm-query-analytics/35988 "2025-01-06T17:59:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![percona\_mm](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@percona\_mm](https://forums.percona.com/u/percona_mm)\
**Post date:** [January 6, 2025, 5:59pm UTC](https://forums.percona.com/t/pmm-query-analytics/35988/1 "2025-01-06T17:59:47Z")

</div>

Hi

We installed PMM Version 2.43.2 and we can monitor 3 servers where we installed Percona Xtra Cluster, except on dashboard “PMM Query Analytics”, here just appear pmm-server and we can’t add the 3 servers.

Please advice.

Thank you

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [January 7, 2025, 6:26pm UTC](https://forums.percona.com/t/pmm-query-analytics/35988/2 "2025-01-07T18:26:48Z")

</div>

Please provide the exact command you used to add the pmm-agent to each of the 3 servers. Verify that your slow log is enabled, and long-query-time=0, or verify that your performance\_schema is enabled with defaults.

---

<div class="post-metadata">

**Author:** ![percona\_mm](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@percona\_mm](https://forums.percona.com/u/percona_mm)\
**Post date:** [January 8, 2025, 5:15pm UTC](https://forums.percona.com/t/pmm-query-analytics/35988/3 "2025-01-08T17:15:21Z")

</div>

Thank you for your reply.

We add the pmm-agent on 3 nodes using:  
apt-get install pmm2-client

$ pmm-admin status  
Agent ID : /agent\_id/8d197198-9e7a-470f-b68f-8e2fe86bccc2  
Node ID : /node\_id/4aeb89e8-172c-4bee-919f-cf463133dd79  
Node name: xx

PMM Server:  
URL : [https://xx.xx.xx.xx:443/](https://xx.xx.xx.xx:443/)  
Version: 2.43.2

PMM Client:  
Connected : true  
Time drift : 413.189µs  
Latency : 647.228µs  
Connection uptime: 100  
pmm-admin version: 2.43.2  
pmm-agent version: 2.43.2  
Agents:  
/agent\_id/340e4a71-5cb1-4475-8542-a9b5daec06cf vmagent Running 42000  
/agent\_id/4f9b0bb1-ab7e-4cbc-b817-b83aeac372c2 mysqld\_exporter Running 42002  
/agent\_id/ce6e216e-f592-4d7c-9677-5a3519ba035c node\_exporter Running 42001  
/agent\_id/f8c2dbbb-047e-40da-88ca-d915c9964c87 mysql\_slowlog\_agent Running 0

The slow log is enabled, but the long\_query\_time has this value:

±----------------±------------+  
| Variable\_name | Value |  
±----------------±---------------- +  
| long\_query\_time | 10.000000 |  
±-------------------±--------------+

Please advice  
Thanks

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [January 8, 2025, 6:11pm UTC](https://forums.percona.com/t/pmm-query-analytics/35988/4 "2025-01-08T18:11:35Z")

</div>

> [@percona\_mm](#):
>
> The slow log is enabled, but the long\_query\_time has this value:
> 
> ±----------------±------------+  
> | Variable\_name | Value |  
> ±----------------±---------------- +  
> | long\_query\_time | 10.000000 |  
> ±-------------------±--------------+

That means you will not see any queries inside PMM unless the query takes longer than 10s to execute. I recommend you `SET PERSIST long_query_time=0; FLUSH SLOW LOGS;` Or switch to the perfschema query source.
