Hi! i want to run a copy of pmm-client, enabling only mysql:queries (qan).
Because I am unable to run pmm-client on the same host as MySQL, I am rsyncing the slowlog over to /var/lib/mysql/slow.log in my pmm-client server (debian).
I wish to specify the slowlog file for pmm-client to use, however I keep getting prompted for mysql creds, so I entered those as it asked:
# pmm-admin add mysql:queries --query-source slowlog --slow-log-rotation false --host 10.0.2.2 --port 32773 --user root --password my-secret-pw mysql
OK, now monitoring MySQL queries from slowlog using DSN root:***@tcp(10.0.2.2:32773)
# pmm-admin list
pmm-admin 1.11.0
PMM Server | 10.0.2.2:8080
Client Name | debian-utility-vm
Client Address | 172.17.0.1
Service Manager | linux-systemd
-------------- ------- ----------- -------- ----------------------------- --------------------------------------------------------------------------------------
SERVICE TYPE NAME LOCAL PORT RUNNING DATA SOURCE OPTIONS
-------------- ------- ----------- -------- ----------------------------- --------------------------------------------------------------------------------------
mysql:queries false - YES root:***@tcp(10.0.2.2:32773) query_source=slowlog, query_examples=true, slow_log_rotation=true, retain_slow_logs=1
Despite having /var/lib/mysql/slow.log in-place. I can see these logs:
# tail -f /var/log/pmm-mysql-queries-0.log
2018/06/21 11:01:00.026600 WARNING qan-interval stat /var/lib/mysql/6217cce50e2a-slow.log: no such file or directory
2018/06/21 11:02:00.030392 WARNING qan-interval stat /var/lib/mysql/6217cce50e2a-slow.log: no such file or directory
2018/06/21 11:03:00.024187 WARNING qan-interval stat /var/lib/mysql/6217cce50e2a-slow.log: no such file or directory
2018/06/21 11:04:00.020316 WARNING qan-interval stat /var/lib/mysql/6217cce50e2a-slow.log: no such file or directory
2018/06/21 11:05:00.020676 WARNING qan-interval stat /var/lib/mysql/6217cce50e2a-slow.log: no such file or directory
2018/06/21 11:06:00.020533 WARNING qan-interval stat /var/lib/mysql/6217cce50e2a-slow.log: no such file or directory
2018/06/21 11:07:00.019434 WARNING qan-interval stat /var/lib/mysql/6217cce50e2a-slow.log: no such file or directory
2018/06/21 11:08:00.033935 WARNING qan-interval stat /var/lib/mysql/6217cce50e2a-slow.log: no such file or directory
2018/06/21 11:09:00.018048 WARNING qan-interval stat /var/lib/mysql/6217cce50e2a-slow.log: no such file or directory
2018/06/21 11:10:00.018248 WARNING qan-interval stat /var/lib/mysql/6217cce50e2a-slow.log: no such file or directory
How is the pmm-client slowlog file chosen? Can I specify the slowlog file to analyze? When specifying
--query-source slowlog
, where does pmm-client look for the slowlog file?