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 |
wget https://raw.githubusercontent.com/Percona-QA/percona-qa/master/pmm-info.sh<br>vi pmm-info.sh<br>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 |
[roel@localhost ~]$ wget https://raw.githubusercontent.com/Percona-QA/percona-qa/master/pmm-info.sh && sh ./pmm-info.sh<br>--2016-11-01 09:49:22-- https://raw.githubusercontent.com/Percona-QA/percona-qa/master/pmm-info.sh<br>Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.100.133<br>Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.100.133|:443... connected.<br>HTTP request sent, awaiting response... 200 OK<br>Length: 1451 (1.4K) [text/plain]<br>Saving to: 'pmm-info.sh'<br><br>100%[=========================================================================================================================================>] 1,451 --.-K/s in 0s<br><br>2016-11-01 09:49:23 (218 MB/s) - 'pmm-info.sh' saved [1451/1451]<br><br>QA PMM Info Script v0.07<br>==================== uname -a<br> 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<br>==================== /proc/version<br> Linux version 3.10.0-123.13.2.el7.x86_64 ([email protected]) (gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) ) #1 SMP Thu Dec 18 14:09:13 UTC 2014<br>==================== OS Release (filtered cat /etc/*-release):<br> CentOS Linux release 7.2.1511 (Core)<br> HOME_URL="https://www.centos.org/"<br> ID="centos"<br> ID_LIKE="rhel fedora"<br> NAME="CentOS Linux"<br> PRETTY_NAME="CentOS Linux 7 (Core)"<br> VERSION="7 (Core)"<br> VERSION_ID="7"<br>==================== Docker release (docker --version):<br> Docker version 1.10.3, build cb079f6-unsupported<br>==================== SELinux status if present (sestatus):<br> SELinux status: enabled<br> SELinuxfs mount: /sys/fs/selinux<br> SELinux root directory: /etc/selinux<br> Loaded policy name: targeted<br> Current mode: enforcing<br> Mode from config file: enforcing<br> Policy MLS status: enabled<br> Policy deny_unknown status: allowed<br> Max kernel policy version: 28<br>==================== PMM server images (sudo docker images | grep pmm):<br> docker.io/percona/pmm-server 1.0.5 0eade99a1612 2 weeks ago 652.9 MB<br> docker.io/percona/pmm-server 1.0.4 1c83d650105e 6 weeks ago 677.3 MB<br> docker.io/percona/pmm-server 1.0.4-dev20160908.24845ea 4406c13d0ba3 7 weeks ago 676 MB<br>==================== PMM server state (sudo docker ps -a | grep pmm):<br> fdf5e6adca7e percona/pmm-server:1.0.4 "/opt/entrypoint.sh" 5 days ago Exited (137) 5 days ago pmm-server3<br> 843a2ee31c96 percona/pmm-server:1.0.4 "/opt/entrypoint.sh" 5 days ago Created pmm-server2<br> f075314b529f percona/pmm-server:1.0.4 "/bin/true" 5 days ago Created pmm-data2<br> 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<br> 653fb58ce723 percona/pmm-server:1.0.5 "/bin/true" 6 days ago Created pmm-data<br>==================== Exporter status (ps -ef | grep exporter):<br> 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<br> 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<br> 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<br> 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<br> roel 4445 4392 0 10:24 pts/0 00:00:00 grep exporter<br>==================== PMM agent (sudo pmm-admin --version):<br> 1.0.5<br>==================== PMM info (sudo pmm-admin info):<br> pmm-admin 1.0.5<br> PMM Server | 192.168.0.13<br> Client Name | localhost.localdomain<br> Client Address | 192.168.0.13<br> Service manager | linux-systemd<br>==================== PMM network check (sudo pmm-admin check-network):<br> PMM Network Status<br> Server | 192.168.0.13<br> Client | 192.168.0.13<br> * Client --> Server<br> --------------- -------<br> SERVER SERVICE STATUS<br> --------------- -------<br> Consul API OK<br> QAN API OK<br> Prometheus API OK<br> Connection duration | 102.017µs<br> Request duration | 211.962µs<br> Full round trip | 313.979µs<br> * Client <-- Server<br> -------------- ----- ---------------------- -------<br> SERVICE TYPE NAME REMOTE ENDPOINT STATUS<br> -------------- ----- ---------------------- -------<br> linux:metrics test 192.168.0.13:42000 OK<br> mysql:metrics test 192.168.0.13:42002 OK<br>==================== PMM list (sudo pmm-admin list):<br> pmm-admin 1.0.5<br> PMM Server | 192.168.0.13<br> Client Name | localhost.localdomain<br> Client Address | 192.168.0.13<br> Service manager | linux-systemd<br> -------------- ----- ------------ -------- --------------------------------------------------------------------------------------------- ------------------------<br> SERVICE TYPE NAME CLIENT PORT RUNNING DATA SOURCE OPTIONS<br> -------------- ----- ------------ -------- --------------------------------------------------------------------------------------------- ------------------------<br> linux:metrics test 42000 YES -<br> 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<br> 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 |
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<br>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<br> |
Resources
RELATED POSTS