Explain about request com_

Hi,

At 3h00 each day, I see a pic of Networker Usage between 3 to 7 GiB. But in same time, I see a pic graph “Top Command Counters Hourly” with com_set_option, com_select, and more.

I need help to understand this traffic and this all requests ?
Regards
OIivier

Hi Olivier,

These map directly to the MySQL com_* STATUS counters. You can read more on them in the online documentation:
https://dev.mysql.com/doc/refman/8.4/en/server-status-variables.html

Com_xxx

The Com_xxx statement counter variables indicate the number of times each xxx statement has been executed. There is one status variable for each type of statement. For example, Com_delete and Com_update count DELETE and UPDATE statements, respectively. Com_delete_multi and Com_update_multi are similar but apply to DELETE and UPDATE statements that use multiple-table syntax.
[…]

If you have query analytics configured for that node, you can also check the QAN dashboard on PMM to see which queries in particular were running at those times:

Hi,

Thanks for this explain. But if I use QAN and select a time period (3:00 - 4:00), I see only queries from PMM but not from my all MariadB node. Why ?

Regards
Olivier

You will need to check if you are correctly collecting query-related information on that database node. Check with:

pmm-admin list

You should see the query exporter running correctly, or check the PMM client logs:

journalctl -u pmm-agent

By default, you need to be logging queries in the slow query log for QAN to get query-related information, so also check it is enabled and that long_query_time is not set to something that would not allow queries to be logged

Hi,

I’m not sure that I have the correct set of the agent. See below the output:
[root@svx-mdb-04t etc]# pmm-admin list
Service type Service name Address and port Service ID
MySQL svx-mdb-04t-mysql 127.0.0.1:3306 /service_id/8bf4db57-7e8f-4e26-88a4-0dbba30fe6c0

Agent type Status Metrics Mode Agent ID Service ID Port
pmm_agent Connected /agent_id/1698c8f9-7d3c-4137-8416-0ef91a68e3cb 0
node_exporter Running push /agent_id/a65d1f6c-7a94-427d-9feb-cb6aab5585e8 42001
mysqld_exporter Running push /agent_id/2088cb1f-59ed-4f13-a999-0856a2ac8738 /service_id/8bf4db57-7e8f-4e26-88a4-0dbba30fe6c0 42000
mysql_slowlog_agent Running /agent_id/7f7ace05-c19b-400f-af2b-effd2d63f497 /service_id/8bf4db57-7e8f-4e26-88a4-0dbba30fe6c0 0
vmagent Running push /agent_id/f8d1a733-8d61-4fcb-bd70-235c7b1eb7c0 42002

[root@svx-mdb-04t etc]# journalctl -u pmm-agent
– Logs begin at Tue 2024-06-04 08:37:15 CEST, end at Thu 2024-06-06 07:54:18 CEST. –
Jun 04 08:37:20 svx-mdb-04t systemd[1]: Started pmm-agent.
Jun 04 08:37:20 svx-mdb-04t pmm-agent[1038]: time=“2024-06-04T08:37:20.531+02:00” level=info msg=“Loading configuration file /usr/local/percona/pmm2/config/pmm-agent.yaml.” component=main
Jun 04 08:37:20 svx-mdb-04t pmm-agent[1038]: time=“2024-06-04T08:37:20.533+02:00” level=info msg=“Using /usr/local/percona/pmm2/exporters/node_exporter” component=main
Jun 04 08:37:20 svx-mdb-04t pmm-agent[1038]: time=“2024-06-04T08:37:20.533+02:00” level=info msg=“Using /usr/local/percona/pmm2/exporters/mysqld_exporter” component=main
Jun 04 08:37:20 svx-mdb-04t pmm-agent[1038]: time=“2024-06-04T08:37:20.533+02:00” level=info msg=“Using /usr/local/percona/pmm2/exporters/mongodb_exporter” component=main
Jun 04 08:37:20 svx-mdb-04t pmm-agent[1038]: time=“2024-06-04T08:37:20.533+02:00” level=info msg=“Using /usr/local/percona/pmm2/exporters/postgres_exporter” component=main
Jun 04 08:37:20 svx-mdb-04t pmm-agent[1038]: time=“2024-06-04T08:37:20.533+02:00” level=info msg=“Using /usr/local/percona/pmm2/exporters/proxysql_exporter” component=main
Jun 04 08:37:20 svx-mdb-04t pmm-agent[1038]: time=“2024-06-04T08:37:20.533+02:00” level=info msg=“Using /usr/local/percona/pmm2/exporters/rds_exporter” component=main
Jun 04 08:37:20 svx-mdb-04t pmm-agent[1038]: time=“2024-06-04T08:37:20.533+02:00” level=info msg=“Using /usr/local/percona/pmm2/exporters/azure_exporter” component=main
Jun 04 08:37:20 svx-mdb-04t pmm-agent[1038]: time=“2024-06-04T08:37:20.533+02:00” level=info msg=“Using /usr/local/percona/pmm2/exporters/vmagent” component=main
Jun 04 08:37:22 svx-mdb-04t pmm-agent[1038]: time=“2024-06-04T08:37:22.847+02:00” level=warning msg="ts=2024-06-04T06:37:22.844Z caller=node_exporter.go:186 level=warn msg="Node Exporter is running as root user. This exporter is designed to run as unprivileged user, root is not re>
Jun 05 09:44:30 svx-mdb-04t pmm-agent[1038]: time=“2024-06-05T09:44:30.519+02:00” level=error msg="Failed to establish two-way communication channel: unexpected HTTP status code received from server: 500 (Internal Server Error); transport: received unexpected content-type "text/ht>
Jun 05 09:44:36 svx-mdb-04t pmm-agent[1038]: time=“2024-06-05T09:44:36.329+02:00” level=error msg=“Failed to connect to svx-perc-01.unifr.ch:443: timeout.” component=client
Jun 05 09:44:40 svx-mdb-04t pmm-agent[1038]: time=“2024-06-05T09:44:40.216+02:00” level=error msg="Failed to establish two-way communication channel: unexpected HTTP status code received from server: 500 (Internal Server Error); transport: received unexpected content-type "text/ht>
Jun 05 10:00:25 svx-mdb-04t pmm-agent[1038]: time=“2024-06-05T10:00:25.967+02:00” level=error msg="Failed to establish two-way communication channel: unexpected HTTP status code received from server: 500 (Internal Server Error); transport: received unexpected content-type "text/ht>
Jun 05 10:00:33 svx-mdb-04t pmm-agent[1038]: time=“2024-06-05T10:00:33.608+02:00” level=error msg=“Failed to connect to svx-perc-01.unifr.ch:443: timeout.” component=client
Jun 05 10:03:48 svx-mdb-04t pmm-agent[1038]: time=“2024-06-05T10:03:48.516+02:00” level=error msg="Failed to establish two-way communication channel: unexpected HTTP status code received from server: 500 (Internal Server Error); transport: received unexpected content-type "text/ht>
[root@svx-mdb-04t etc]#

Or this is database parameter. If it is that, the parameter is set to 2.
MariaDB [(none)]> show variables like ‘long_query_time’;
±----------------±---------+
| Variable_name | Value |
±----------------±---------+
| long_query_time | 2.000000 |
±----------------±---------+
1 row in set (0.001 sec)

MariaDB [(none)]>

I need more help
Regards
Olivier