Hello. Probably I found a little bug with removing qan monitoring.
~# pmm-admin list
pmm-admin 1.3.1
PMM Server | pmm.*.com
Client Name | slave.*.com
Client Address | *.*.*.*
Service Manager | linux-systemd
-------------- ------------------------------- ----------- -------- ------------------------------------------ ------------------------------------------
SERVICE TYPE NAME LOCAL PORT RUNNING DATA SOURCE OPTIONS
-------------- ------------------------------- ----------- -------- ------------------------------------------ ------------------------------------------
mysql:queries slave.*.com - YES pmm:***@unix(/var/run/mysqld/mysqld.sock) query_source=slowlog, query_examples=true
linux:metrics slave.*.com 42000 YES -
mysql:metrics slave.*.com 42002 YES pmm:***@unix(/var/run/mysqld/mysqld.sock)
Look’s good.
Then I try to remove pan monitoring
~# pmm-admin remove mysql:queries
OK, removed MySQL queries slave*.com from monitoring.
~# pmm-admin list
pmm-admin 1.3.1
PMM Server | pmm.*.com
Client Name | slave.*.com
Client Address | *.*.*.*
Service Manager | linux-systemd
-------------- ------------------------------- ----------- -------- ------------------------------------------ --------
SERVICE TYPE NAME LOCAL PORT RUNNING DATA SOURCE OPTIONS
-------------- ------------------------------- ----------- -------- ------------------------------------------ --------
linux:metrics slave.*.com 42000 YES -
mysql:metrics slave.*.com 42002 YES pmm:***@unix(/var/run/mysqld/mysqld.sock)
)
Look’s correctly
Then I try to return monitoring back. And I see the error
~# pmm-admin add mysql --user user --password pass
OK, 2 services were removed.
No orphaned services found.
[linux:metrics] OK, now monitoring this system.
[mysql:metrics] OK, now monitoring MySQL metrics using DSN pmm:***@unix(/var/run/mysqld/mysqld.sock)
[mysql:queries] Error adding MySQL queries: PUT http://pmm.*.com/qan-api/instances/dfb24b19fab94d8e4763c690e262f7fd: API returned HTTP status code 409, expected 204
~# pmm-admin list
pmm-admin 1.3.1
PMM Server | pmm.*.com
Client Name | slave.*.com
Client Address | *.*.*.*
Service Manager | linux-systemd
-------------- ------------------------------- ----------- -------- ------------------------------------------ --------
SERVICE TYPE NAME LOCAL PORT RUNNING DATA SOURCE OPTIONS
-------------- ------------------------------- ----------- -------- ------------------------------------------ --------
linux:metrics slave.*.com 42000 YES -
mysql:metrics slave.*.com 42002 YES pmm:***@unix(/var/run/mysqld/mysqld.sock)
Next steps:
root@authDB-ha-0a29af3bd09c2c183:~# rm -f /usr/local/percona/qan-agent/config/agent.conf
~# pmm-admin add mysql --user user --password pass
OK, 2 services were removed.
No orphaned services found.
[linux:metrics] OK, now monitoring this system.
[mysql:metrics] OK, now monitoring MySQL metrics using DSN pmm:***@unix(/var/run/mysqld/mysqld.sock)
[mysql:queries] OK, now monitoring MySQL queries from slowlog using DSN pmm:***@unix(/var/run/mysqld/mysqld.sock)
:~# pmm-admin list
pmm-admin 1.3.1
PMM Server | pmm.*.com
Client Name | slave.*.com
Client Address | *.*.*.*
Service Manager | linux-systemd
-------------- ------------------------------- ----------- -------- ------------------------------------------ ------------------------------------------
SERVICE TYPE NAME LOCAL PORT RUNNING DATA SOURCE OPTIONS
-------------- ------------------------------- ----------- -------- ------------------------------------------ ------------------------------------------
mysql:queries slave.*.com - YES pmm:***@unix(/var/run/mysqld/mysqld.sock) query_source=slowlog, query_examples=true
linux:metrics slave.*.com 42000 YES -
mysql:metrics slave.*.com 42002 YES pmm:***@unix(/var/run/mysqld/mysqld.sock))