This blog post discusses an information script for the Percona Monitoring and Management (PMM) tool.
In recent news, we announced the fresh-of-the-press Percona Monitoring and Management (or PMM for short) platform. Given the interaction of the different components that together make up PMM, I developed a script that helps provide you information about the status of your PMM installation.
You can use this script yourself, or one of our support might point you to this page to obtain the information they need to troubleshoot an issue you are experiencing.
You will likely want to execute this script once on the PMM server (i.e., the server on which you installed the docker image), and once on the client (i.e., where you installed the PMM client rpm/apt package), if they are not the same (virtual) machine. It provides a different output for each. When sending this information back to us, please ensure to identify which output belongs to which machine (either the server or the client).
To get/run the script, use (please note that this script requires sudo privileges):
wget https://raw.githubusercontent.com/Percona-QA/percona-qa/master/pmm-info.sh && sh ./pmm-info.sh
If you would like to examine the script contents before executing it, you can split the command:
1 2 3 | wget https://raw.githubusercontent.com/Percona-QA/percona-qa/master/pmm-info.sh vi pmm-info.sh sh ./pmm-info.sh |
If you have both the PMM server and the PMM client on a single machine, the output looks similar to the following:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 | [roel@localhost ~]$ wget https://raw.githubusercontent.com/Percona-QA/percona-qa/master/pmm-info.sh && sh ./pmm-info.sh --2016-11-01 09:49:22-- https://raw.githubusercontent.com/Percona-QA/percona-qa/master/pmm-info.sh Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.100.133 Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.100.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 1451 (1.4K) [text/plain] Saving to: ‘pmm-info.sh’ 100%[=========================================================================================================================================>] 1,451 --.-K/s in 0s 2016-11-01 09:49:23 (218 MB/s) - ‘pmm-info.sh’ saved [1451/1451] QA PMM Info Script v0.07 ==================== uname -a Linux localhost.localdomain 3.10.0-123.13.2.el7.x86_64 #1 SMP Thu Dec 18 14:09:13 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux ==================== /proc/version Linux version 3.10.0-123.13.2.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) ) #1 SMP Thu Dec 18 14:09:13 UTC 2014 ==================== OS Release (filtered cat /etc/*-release): CentOS Linux release 7.2.1511 (Core) HOME_URL="https://www.centos.org/" ID="centos" ID_LIKE="rhel fedora" NAME="CentOS Linux" PRETTY_NAME="CentOS Linux 7 (Core)" VERSION="7 (Core)" VERSION_ID="7" ==================== Docker release (docker --version): Docker version 1.10.3, build cb079f6-unsupported ==================== SELinux status if present (sestatus): SELinux status: enabled SELinuxfs mount: /sys/fs/selinux SELinux root directory: /etc/selinux Loaded policy name: targeted Current mode: enforcing Mode from config file: enforcing Policy MLS status: enabled Policy deny_unknown status: allowed Max kernel policy version: 28 ==================== PMM server images (sudo docker images | grep pmm): docker.io/percona/pmm-server 1.0.5 0eade99a1612 2 weeks ago 652.9 MB docker.io/percona/pmm-server 1.0.4 1c83d650105e 6 weeks ago 677.3 MB docker.io/percona/pmm-server 1.0.4-dev20160908.24845ea 4406c13d0ba3 7 weeks ago 676 MB ==================== PMM server state (sudo docker ps -a | grep pmm): fdf5e6adca7e percona/pmm-server:1.0.4 "/opt/entrypoint.sh" 5 days ago Exited (137) 5 days ago pmm-server3 843a2ee31c96 percona/pmm-server:1.0.4 "/opt/entrypoint.sh" 5 days ago Created pmm-server2 f075314b529f percona/pmm-server:1.0.4 "/bin/true" 5 days ago Created pmm-data2 2090c072b56a percona/pmm-server:1.0.5 "/opt/entrypoint.sh" 6 days ago Up 7 minutes 0.0.0.0:80->80/tcp, 443/tcp pmm-server 653fb58ce723 percona/pmm-server:1.0.5 "/bin/true" 6 days ago Created pmm-data ==================== Exporter status (ps -ef | grep exporter): root 2748 1 0 09:44 ? 00:00:00 /bin/sh -c /usr/local/percona/pmm-client/node_exporter -web.listen-address=192.168.0.13:42000 -collectors.enabled=diskstats,filesystem,loadavg,meminfo,netdev,netstat,stat,time,uname,vmstat >> /var/log/pmm-linux-metrics-42000.log 2>&1 root 2749 1 0 09:44 ? 00:00:00 /bin/sh -c /usr/local/percona/pmm-client/mysqld_exporter -collect.auto_increment.columns=true -collect.binlog_size=true -collect.global_status=true -collect.global_variables=true -collect.info_schema.innodb_metrics=true -collect.info_schema.processlist=true -collect.info_schema.query_response_time=true -collect.info_schema.tables=true -collect.info_schema.tablestats=true -collect.info_schema.userstats=true -collect.perf_schema.eventswaits=true -collect.perf_schema.file_events=true -collect.perf_schema.indexiowaits=true -collect.perf_schema.tableiowaits=true -collect.perf_schema.tablelocks=true -collect.slave_status=true -web.listen-address=192.168.0.13:42002 >> /var/log/pmm-mysql-metrics-42002.log 2>&1 root 2750 2748 1 09:44 ? 00:00:37 /usr/local/percona/pmm-client/node_exporter -web.listen-address=192.168.0.13:42000 -collectors.enabled=diskstats,filesystem,loadavg,meminfo,netdev,netstat,stat,time,uname,vmstat root 2751 2749 0 09:44 ? 00:00:05 /usr/local/percona/pmm-client/mysqld_exporter -collect.auto_increment.columns=true -collect.binlog_size=true -collect.global_status=true -collect.global_variables=true -collect.info_schema.innodb_metrics=true -collect.info_schema.processlist=true -collect.info_schema.query_response_time=true -collect.info_schema.tables=true -collect.info_schema.tablestats=true -collect.info_schema.userstats=true -collect.perf_schema.eventswaits=true -collect.perf_schema.file_events=true -collect.perf_schema.indexiowaits=true -collect.perf_schema.tableiowaits=true -collect.perf_schema.tablelocks=true -collect.slave_status=true -web.listen-address=192.168.0.13:42002 roel 4445 4392 0 10:24 pts/0 00:00:00 grep exporter ==================== PMM agent (sudo pmm-admin --version): 1.0.5 ==================== PMM info (sudo pmm-admin info): pmm-admin 1.0.5 PMM Server | 192.168.0.13 Client Name | localhost.localdomain Client Address | 192.168.0.13 Service manager | linux-systemd ==================== PMM network check (sudo pmm-admin check-network): PMM Network Status Server | 192.168.0.13 Client | 192.168.0.13 * Client --> Server --------------- ------- SERVER SERVICE STATUS --------------- ------- Consul API OK QAN API OK Prometheus API OK Connection duration | 102.017µs Request duration | 211.962µs Full round trip | 313.979µs * Client <-- Server -------------- ----- ---------------------- ------- SERVICE TYPE NAME REMOTE ENDPOINT STATUS -------------- ----- ---------------------- ------- linux:metrics test 192.168.0.13:42000 OK mysql:metrics test 192.168.0.13:42002 OK ==================== PMM list (sudo pmm-admin list): pmm-admin 1.0.5 PMM Server | 192.168.0.13 Client Name | localhost.localdomain Client Address | 192.168.0.13 Service manager | linux-systemd -------------- ----- ------------ -------- --------------------------------------------------------------------------------------------- ------------------------ SERVICE TYPE NAME CLIENT PORT RUNNING DATA SOURCE OPTIONS -------------- ----- ------------ -------- --------------------------------------------------------------------------------------------- ------------------------ linux:metrics test 42000 YES - mysql:queries test 42001 YES root:***@unix(/sda/COMP8-PS131016-percona-server-5.6.33-78.0-linux-x86_64-debug/socket.sock) query_source=perfschema mysql:metrics test 42002 YES root:***@unix(/sda/COMP8-PS131016-percona-server-5.6.33-78.0-linux-x86_64-debug/socket.sock) |
Support might also ask you to run the extended version of the script. This produces a lot of output, and it easier to sent the output to a log file:
1 2 | wget https://raw.githubusercontent.com/Percona-QA/percona-qa/master/pmm-info.sh && sh ./pmm-info.sh ext > pmm-server.log # Please execute this on the PMM server, and sent us pmm-server.log wget https://raw.githubusercontent.com/Percona-QA/percona-qa/master/pmm-info.sh && sh ./pmm-info.sh > pmm-client.log # Please execute this on the PMM client, and sent us pmm-client.log |