# When MariaDB IO Thread is in Connecting state then Alerting is not working

**URL:** https://forums.percona.com/t/when-mariadb-io-thread-is-in-connecting-state-then-alerting-is-not-working/25695
**Category:** Percona Monitoring and Management (PMM)
**Created:** [October 5, 2023, 6:53pm UTC](https://forums.percona.com/t/when-mariadb-io-thread-is-in-connecting-state-then-alerting-is-not-working/25695 "2023-10-05T18:53:11Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Naresh9999](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/naresh9999/32/5568_2.png) [@Naresh9999](https://forums.percona.com/u/Naresh9999)
#### Post date: [October 5, 2023, 6:53pm UTC](https://forums.percona.com/t/when-mariadb-io-thread-is-in-connecting-state-then-alerting-is-not-working/25695/1 "2023-10-05T18:53:11Z")

</div>

When the IO state is in the Yes/No state, the below query is working fine, but when the IO state is in the Connecting state, the below query is not working, and we are not able to receive the alerts.

Query: **mysql\_slave\_status\_master\_server\_id \> 0 and ON (instance) mysql\_slave\_status\_slave\_io\_running == 0**

 ![image](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/b/bceb832a7f001a7912b699a6c47b0deb0db60eb3.png)

But as per the below screenshot, on the Replication Dashboard, the IO thread status is NO.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/6/6d7b5e4dd0320e22c38812d39ca3aeebe87c720f.png)

And on the DB server, the IO thread status

 ![image](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/7/7de73b8fd79a698ad98cceec413a0c9177238a7b.png)

But when I change the query like below, then it’s working fine.

**mysql\_slave\_status\_master\_server\_id == 0 and ON (instance) mysql\_slave\_status\_slave\_io\_running == 0**

 ![image](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/f/fde083c479782bdf500f4c4025ef1923a78edcf3.png)

NOTE: Even Replication error number also missing on the dashboard.

---

<div class="post-metadata">

### Author: ![Naresh9999](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/naresh9999/32/5568_2.png) [@Naresh9999](https://forums.percona.com/u/Naresh9999)
#### Post date: [November 6, 2023, 7:04am UTC](https://forums.percona.com/t/when-mariadb-io-thread-is-in-connecting-state-then-alerting-is-not-working/25695/2 "2023-11-06T07:04:00Z")

</div>

I was able to fix the above issue using the below options.

A Query: **label\_match(( mysql\_slave\_status\_slave\_sql\_running == 0 or mysql\_slave\_status\_slave\_io\_running == 0), “environment”, “PROD|GCP-PROD”)**

 ![](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/a/a3447b9aa6168c36b6184a0c8990b5174a44e175.png)

B Expression: **$A == 0**

 ![](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/b/bcfb32402f5a053539cab77223be3fcf67569e4c.png)

 ![](https://us1.discourse-cdn.com/flex019/uploads/percona1/original/2X/3/3d164a7967b4f66e85dd1440cea103239b86ddb6.png)
