I’m having difficulty configuring the PMM client on a database server. One approach I’ve taken is to uninstall and reinstall the client, however the uninstall script seems to be leaving around configuration which is then picked up during the reinstall. How do I clean out the old configuration before reinstallation?
[COLOR=#0000CD]$ ls /etc/init.d | grep perc # nothing
$ ps -ef | grep perc # nothing
$ s find / -name ‘pmm*’
/var/log/pmm-queries-exporter-42001.log
/var/log/pmm-mysql-exporter-42003.log
/var/log/pmm-mysql-exporter-42004.log
/var/log/pmm-mysql-exporter-42002.log
/root/pmm-client-1.0.3-x86_64
/root/pmm-client-1.0.3-x86_64/bin/pmm-admin
/root/pmm-client.tar.gz
/tmp/pmm-client-install.log
$ s find / -name ‘percona*’
/usr/share/doc/percona-toolkit-2.2.19
/usr/share/doc/percona-release-0.1
/usr/share/doc/percona-xtrabackup-24-2.4.4
/usr/share/man/man1/percona-toolkit.1p.gz
/usr/share/percona-server
/usr/local/percona
/etc/yum.repos.d/percona-release.repo
/var/lib/yum/repos/x86_64/6/percona-release-noarch
/var/lib/yum/repos/x86_64/6/percona-release-x86_64
/var/tmp/yum-sonia-J3Dyd6/x86_64/6/percona-release-noarch
/var/tmp/yum-sonia-J3Dyd6/x86_64/6/percona-release-x86_64
/var/tmp/yum-root-BF1ppj/percona-release-0.1-3.noarch.rpm
/var/cache/yum/x86_64/6/percona-release-noarch
/var/cache/yum/x86_64/6/percona-release-x86_64
/root/pmm-client-1.0.3-x86_64/percona-qan-agent-1.0.0-20160805.869bf3d-x86_64.tar.gz
/root/pmm-client-1.0.3-x86_64/percona-qan-agent-1.0.0-20160805.869bf3d-x86_64
/root/pmm-client-1.0.3-x86_64/percona-qan-agent-1.0.0-20160805.869bf3d-x86_64/bin/percona-qan-agent-installer
/root/pmm-client-1.0.3-x86_64/percona-qan-agent-1.0.0-20160805.869bf3d-x86_64/bin/percona-qan-agent
/root/pmm-client-1.0.3-x86_64/percona-qan-agent-1.0.0-20160805.869bf3d-x86_64/init.d/percona-qan-agent
/root/percona-toolkit-2.2.18
/root/percona-toolkit-2.2.18/docs/percona-toolkit.pod
/root/percona-toolkit.tar.gz
/tmp/percona-version-check
$ s ./install 3.4.5.6:8080 4.5.6.7
[1/3] Installing pmm-admin…
[2/3] Installing Query Analytics Agent…
[3/3] Installing Prometheus exporters…
Done installing PMM client. Next steps:
…
# —> some old configuration seems to be hanging around:
[COLOR=#0000CD]$ s pmm-admin list
pmm-admin 1.0.3
PMM Server | 3.4.5.6:8080
Client Name | database1
Client Address | 4.5.6.7
Service manager | unix-systemv
METRIC SERVICE NAME CLIENT PORT RUNNING DATA SOURCE OPTIONS
queries database1 42001 NO root:***@unix(/var/run/mysqld/mysqld.sock) query_source=slowlog
$ s pmm-admin remove queries database1
Error removing queries database1: “service” failed: exit status 1, pmm-queries-exporter-42001: unrecognized service
$ ls /etc/init.d | grep perc # nothing
Network check is also unhappy:
[COLOR=#0000CD]$ s pmm-admin check-network --no-emoji
PMM Network Status
Server | 1.2.3.4:8080
Client | 4.5.6.7
- Client > Server
SERVICE CONNECTIVITY
Consul API OK
QAN API OK
Prometheus API OK
Connection duration | 680.806µs
Request duration | 941.322µs
Full round trip | 1.622128ms
- Server > Client
METRIC NAME PROMETHEUS ENDPOINT REMOTE STATE
mysql database1 4.5.6.7:42003 PROBLEM
mysql database1 4.5.6.7:42004 PROBLEM
For endpoints in problem state, please check if the corresponding service is running (“pmm-admin list”).
If all endpoints are down here and “pmm-admin list” shows all services are up,
please check the firewall settings whether this system allows incoming connections by address:port in question.
Firewall allows all traffic on the required 10 network:
[COLOR=#0000CD]$ s iptables -nL
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT all – 0.0.0.0/0 0.0.0.0/0
ACCEPT all – 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
ACCEPT icmp – 0.0.0.0/0 0.0.0.0/0 icmp type 8
ACCEPT tcp – 0.0.0.0/0 0.0.0.0/0 tcp dpt:22 state NEW,ESTABLISHED
ACCEPT tcp – 10.0.0.0/8 0.0.0.0/0 tcp state NEW,ESTABLISHED
ACCEPT udp – 10.0.0.0/8 0.0.0.0/0 udp state NEW,ESTABLISHED
LOGGING all – 0.0.0.0/0 0.0.0.0/0
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all – 0.0.0.0/0 0.0.0.0/0
Chain LOGGING (1 references)
target prot opt source destination
LOG all – 0.0.0.0/0 0.0.0.0/0 limit: avg 2/min burst 5 LOG flags 0 level 4 prefix `IPTables-Dropped: ’
DROP all – 0.0.0.0/0 0.0.0.0/0