Hello:
On our Zabbix 1.8.10, we have a client that needs a simple method of checking for MySQL (5.x) Replication status and I wasn't overly convinced I needed someone else's perl or bash script to do so, so I created a UserParameter on the target host using
and this works as expected.
And double-checking my work from the zbx_server,
I get the Expected 'No' response.
The issue seems to be my trigger. When I created it, it fired an alert every 60s for 5 minutes and I received those with this body:
Great. Looks like it is correct. Then the Boss says "change the interval to every 2, no 6 hours" so I changed the interval to 21600, this is where the weirdness starts.
We got alerts...
Subject: db1_zoneC MySQL Replication Status: OK - Recovered
Now, I am pretty certain that No means No and it is not "Recovered".
The trigger I am worried about is this:
Attached are the Item, Trigger and Latest Data screenshots.
I have since set the interval back to 300s and have not received any alerts.
still gets the Expected 'No' response.
Nothing has changed on the underlying zabbix server or the mail host that processes the alerts.
I did just now try to change it from Character to Text but this change doesn't return any data and history is now blank. I changed it back and a screen full of Nos.
If you could point out the issue/error, I would be most grateful.
Thank you,
On our Zabbix 1.8.10, we have a client that needs a simple method of checking for MySQL (5.x) Replication status and I wasn't overly convinced I needed someone else's perl or bash script to do so, so I created a UserParameter on the target host using
Code:
UserParameter=mysql.slave.status,mysql -e "show slave status\G;" | grep Slave_SQL_Running | awk '{print $2}'
And double-checking my work from the zbx_server,
Code:
/usr/local/bin/zabbix_get -s IP -k mysql.slave.status
The issue seems to be my trigger. When I created it, it fired an alert every 60s for 5 minutes and I received those with this body:
Code:
replication status on db1_zoneC: PROBLEM Last Value: No
We got alerts...
Subject: db1_zoneC MySQL Replication Status: OK - Recovered
Code:
MySQL Replication Status on db1_zoneC: OK Last Value: No
The trigger I am worried about is this:
Code:
(({db1_zoneC:mysql.slave.status.regexp(No)})#1)
I have since set the interval back to 300s and have not received any alerts.
Code:
/usr/local/bin/zabbix_get -s IP -k mysql.slave.status
Nothing has changed on the underlying zabbix server or the mail host that processes the alerts.
I did just now try to change it from Character to Text but this change doesn't return any data and history is now blank. I changed it back and a screen full of Nos.
If you could point out the issue/error, I would be most grateful.
Thank you,

Comment