Not the answer you need?
Register and ask your own question!

pmm 1.17.1 qan bug

FanFan ContributorCurrent User Role Patron
the system activity dashboard use $host variable.(see pic)
but our mysql:metrics name is not same as linux:metrics name and it is not $host
It seems that pmm have not considered the scenario of multiple instances.
we use the ip of the linux:metrics name, and use ip_port as the mysql:metrics name

- name: Adding MySQL services to monitoring
shell: >
if ! pmm-admin list | grep {{ item | quote }} | {{ pmm_client_db | quote }} ; then
pmm-admin add {{ item | quote }}
--user {{ pmm_client_db | quote }}
--password {{ pmm_client_db | quote }}
--socket {{ pmm_client_db | quote }}
--disable-tablestats {{ ansible_em2 }}_{{ pmm_client_db }} ; fi
no_log: True
when: ('mysql' in item)
with_items: "{{ pmm_client_add_services }}"

# pmm-admin list
pmm-admin 1.17.1

PMM Server | 192.168.x.143:8080 (password-protected)
Client Name | 192.168.x.180
Client Address | 192.168.x.180
Service Manager | linux-systemd


mysql:queries 192.168.x.180_3306 - YES pmm:***@unix(/data/mysql_3306/tmp/mysql.sock) query_source=slowlog, query_examples=true, slow_log_rotation=true, retain_slow_logs=1
mysql:queries 192.168.x.180_3307 - YES pmm:***@unix(/data/mysql_3307/tmp/mysql.sock) query_source=slowlog, query_examples=true, slow_log_rotation=true, retain_slow_logs=1
mysql:queries 192.168.x.180_3308 - YES pmm:***@unix(/data/mysql_3308/tmp/mysql.sock) query_source=slowlog, query_examples=true, slow_log_rotation=true, retain_slow_logs=1
linux:metrics 192.168.x.180 42000 YES -
mysql:metrics 192.168.x.180_3308 42002 YES pmm:***@unix(/data/mysql_3308/tmp/mysql.sock) tablestats=OFF
mysql:metrics 192.168.x.180_3307 42003 YES pmm:***@unix(/data/mysql_3307/tmp/mysql.sock) tablestats=OFF
mysql:metrics 192.168.x.180_3306 42004 YES pmm:***@unix(/data/mysql_3306/tmp/mysql.sock) tablestats=OFF


  • FanFan Contributor Current User Role Patron
    I manually add a variable $server
    SELECT SUBSTRING_INDEX (`name`,'_',1) as name FROM `pmm`.`instances` WHERE `subsystem_id` IN (3, 4) AND (`deleted` IS NULL OR `deleted` < '1971-01-01 00:00:01') and name="$host";
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.