# pmm 1.17.1 qan bug

**URL:** <https://forums.percona.com/t/pmm-1-17-1-qan-bug/7127>\
**Category:** PMM 1.x\
**Created:** [July 22, 2019, 10:01pm UTC](https://forums.percona.com/t/pmm-1-17-1-qan-bug/7127 "2019-07-22T22:01:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fan](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/fan/32/40_2.png) [@Fan](https://forums.percona.com/u/Fan)\
**Post date:** [July 22, 2019, 10:01pm UTC](https://forums.percona.com/t/pmm-1-17-1-qan-bug/7127/1 "2019-07-22T22:01:53Z")

</div>

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[‘mysql’][‘socket’] | quote }} ; then  
pmm-admin add {{ item | quote }}  
–user {{ pmm\_client\_db[‘mysql’][‘username’] | quote }}  
–password {{ pmm\_client\_db[‘mysql’][‘password’] | quote }}  
–socket {{ pmm\_client\_db[‘mysql’][‘socket’] | quote }}  
–disable-tablestats {{ ansible\_em2[‘ipv4’][‘address’] }}\_{{ pmm\_client\_db[‘mysql’][‘port’] }} ; 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

* * *

SERVICE TYPE NAME LOCAL PORT RUNNING DATA SOURCE OPTIONS

* * *

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

 ![photoid=54341](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/f/fcab9402bae14d487e345ff6fdda2a00c27e3a20.jpeg)

---

<div class="post-metadata">

**Author:** ![Fan](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/fan/32/40_2.png) [@Fan](https://forums.percona.com/u/Fan)\
**Post date:** [July 22, 2019, 10:33pm UTC](https://forums.percona.com/t/pmm-1-17-1-qan-bug/7127/2 "2019-07-22T22:33:42Z")

</div>

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”;

 ![photoid=54343](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/6/6af3812313bcb032ae574a8dbdb4c20c154189be.png)
