Pmm custom query not working

I’m trying to register the query below to monitor mysql’s active session using a custom query in pmm, but it doesn’t work.


image
image

pmm version : 2.40.1
db : mariadb 10.1.23 (os:redhat linux 6.7)

There are no logs in /var/log/messages on the server.

Hello,
Have you checked the blog post?

You might take a look here to see if there is any error:
tail /var/log/syslog | grep mysqld_exporter

Also, verify that the query works as you have it using the same user/password as the PMM agent.

hi. i have already checked that.

In redhat, there is no log as shown below

Also, how should I test this by trying it with the same user/password as the PMM agent? I would appreciate it if you could guide me in more detail.

Yes. Log in to mysql using the same un/pw as the PMM agent. Verify the query works, and returns data.

Yes, I connected as pmm user and the query is executed well.

Since you can execute the query and getting the output. It would be good to check the system logs for any error with mysqld_exporter while running this query.
As you said that there is no such file like /var/log/syslog, can you check if you have /var/log/messages and see if there are any logs related to mysqld_exporter?
Or if you don’t find any system logs, you might want to consider installing rsyslogd package to start logging the system logs on your host to get the logs.

The /var/log/message file exists, but I don’t see the error message.