# Bug with removing monitoring

**URL:** <https://forums.percona.com/t/bug-with-removing-monitoring/5919>\
**Category:** PMM 1.x\
**Created:** [October 7, 2017, 7:20am UTC](https://forums.percona.com/t/bug-with-removing-monitoring/5919 "2017-10-07T07:20:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stateros](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/stateros/32/2490_2.png) [@Stateros](https://forums.percona.com/u/Stateros)\
**Post date:** [October 7, 2017, 7:20am UTC](https://forums.percona.com/t/bug-with-removing-monitoring/5919/1 "2017-10-07T07:20:36Z")

</div>

Hello. Probably I found a little bug with removing qan monitoring.

```auto
~# pmm-admin list
pmm-admin 1.3.1

PMM Server | pmm.*.com
Client Name | slave.*.com
Client Address | *.*.*.*
Service Manager | linux-systemd

-------------- ------------------------------- ----------- -------- ------------------------------------------ ------------------------------------------
SERVICE TYPE NAME LOCAL PORT RUNNING DATA SOURCE OPTIONS
-------------- ------------------------------- ----------- -------- ------------------------------------------ ------------------------------------------
mysql:queries slave.*.com - YES pmm:***&#64;unix(/var/run/mysqld/mysqld.sock) query_source=slowlog, query_examples=true
linux:metrics slave.*.com 42000 YES -
mysql:metrics slave.*.com 42002 YES pmm:***&#64;unix(/var/run/mysqld/mysqld.sock)

```

Look’s good.

Then I try to remove pan monitoring

```auto
~# pmm-admin remove mysql:queries
OK, removed MySQL queries slave*.com from monitoring.
~# pmm-admin list
pmm-admin 1.3.1

PMM Server | pmm.*.com
Client Name | slave.*.com
Client Address | *.*.*.*
Service Manager | linux-systemd

-------------- ------------------------------- ----------- -------- ------------------------------------------ --------
SERVICE TYPE NAME LOCAL PORT RUNNING DATA SOURCE OPTIONS
-------------- ------------------------------- ----------- -------- ------------------------------------------ --------
linux:metrics slave.*.com 42000 YES -
mysql:metrics slave.*.com 42002 YES pmm:***&#64;unix(/var/run/mysqld/mysqld.sock)
)

```

Look’s correctly

Then I try to return monitoring back. And I see the error

```auto
~# pmm-admin add mysql --user user --password pass
OK, 2 services were removed.
No orphaned services found.
[linux:metrics] OK, now monitoring this system.
[mysql:metrics] OK, now monitoring MySQL metrics using DSN pmm:***&#64;unix(/var/run/mysqld/mysqld.sock)
[mysql:queries] Error adding MySQL queries: PUT http://pmm.*.com/qan-api/instances/dfb24b19fab94d8e4763c690e262f7fd: API returned HTTP status code 409, expected 204
~# pmm-admin list
pmm-admin 1.3.1

PMM Server | pmm.*.com
Client Name | slave.*.com
Client Address | *.*.*.*
Service Manager | linux-systemd

-------------- ------------------------------- ----------- -------- ------------------------------------------ --------
SERVICE TYPE NAME LOCAL PORT RUNNING DATA SOURCE OPTIONS
-------------- ------------------------------- ----------- -------- ------------------------------------------ --------
linux:metrics slave.*.com 42000 YES -
mysql:metrics slave.*.com 42002 YES pmm:***&#64;unix(/var/run/mysqld/mysqld.sock)

```

Next steps:

```auto
root&#64;authDB-ha-0a29af3bd09c2c183:~# rm -f /usr/local/percona/qan-agent/config/agent.conf
~# pmm-admin add mysql --user user --password pass
OK, 2 services were removed.
No orphaned services found.
[linux:metrics] OK, now monitoring this system.
[mysql:metrics] OK, now monitoring MySQL metrics using DSN pmm:***&#64;unix(/var/run/mysqld/mysqld.sock)
[mysql:queries] OK, now monitoring MySQL queries from slowlog using DSN pmm:***&#64;unix(/var/run/mysqld/mysqld.sock)
:~# pmm-admin list
pmm-admin 1.3.1

PMM Server | pmm.*.com
Client Name | slave.*.com
Client Address | *.*.*.*
Service Manager | linux-systemd

-------------- ------------------------------- ----------- -------- ------------------------------------------ ------------------------------------------
SERVICE TYPE NAME LOCAL PORT RUNNING DATA SOURCE OPTIONS
-------------- ------------------------------- ----------- -------- ------------------------------------------ ------------------------------------------
mysql:queries slave.*.com - YES pmm:***&#64;unix(/var/run/mysqld/mysqld.sock) query_source=slowlog, query_examples=true
linux:metrics slave.*.com 42000 YES -
mysql:metrics slave.*.com 42002 YES pmm:***&#64;unix(/var/run/mysqld/mysqld.sock))

```

---

<div class="post-metadata">

**Author:** ![Stateros](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/stateros/32/2490_2.png) [@Stateros](https://forums.percona.com/u/Stateros)\
**Post date:** [October 7, 2017, 8:47am UTC](https://forums.percona.com/t/bug-with-removing-monitoring/5919/2 "2017-10-07T08:47:45Z")

</div>

Also want to mentioned that it’s not new bug. It was reproduced on 1.2.2 and 1.3.0 and maybe earlier.

---

<div class="post-metadata">

**Author:** ![Stateros](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/stateros/32/2490_2.png) [@Stateros](https://forums.percona.com/u/Stateros)\
**Post date:** [October 24, 2017, 4:58am UTC](https://forums.percona.com/t/bug-with-removing-monitoring/5919/3 "2017-10-24T04:58:02Z")

</div>

Hi all. Bug with restore qan monitoring still exist in 1.4.0

---

<div class="post-metadata">

**Author:** ![nailya](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/nailya/32/1184_2.png) [@nailya](https://forums.percona.com/u/nailya)\
**Post date:** [October 25, 2017, 6:21am UTC](https://forums.percona.com/t/bug-with-removing-monitoring/5919/4 "2017-10-25T06:21:39Z")

</div>

Hi! Thank you for the bug report. I couldn’t reproduce the problem… Could you provide more information? Which version of MySQL do you use?Which OS?

---

<div class="post-metadata">

**Author:** ![Stateros](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/stateros/32/2490_2.png) [@Stateros](https://forums.percona.com/u/Stateros)\
**Post date:** [October 30, 2017, 5:41am UTC](https://forums.percona.com/t/bug-with-removing-monitoring/5919/5 "2017-10-30T05:41:54Z")

</div>

Sure, I use Ubuntu 16.04.2 with Perona server 5.7.19. Pmm server and clients are 1.4.0.  
I use pmm in docker and for update pmm from 1.2.2 I use ui button on main window. In few days I plan to rebuild pmm instance from scratch. Maybe this will help.
