Ad Widget

Collapse

trigger worked at 60s but not 21600s?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cirrhus9.com
    Member
    • Feb 2012
    • 58

    #1

    trigger worked at 60s but not 21600s?

    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
    Code:
    UserParameter=mysql.slave.status,mysql -e "show slave status\G;" | grep Slave_SQL_Running | awk '{print $2}'
    and this works as expected.
    And double-checking my work from the zbx_server,
    Code:
    /usr/local/bin/zabbix_get -s IP -k mysql.slave.status
    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:
    Code:
    replication status on db1_zoneC: PROBLEM Last Value: No
    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
    Code:
    MySQL Replication Status on db1_zoneC: OK Last Value: No
    Now, I am pretty certain that No means No and it is not "Recovered".

    The trigger I am worried about is this:
    Code:
    (({db1_zoneC:mysql.slave.status.regexp(No)})#1)
    Attached are the Item, Trigger and Latest Data screenshots.

    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
    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,
    Attached Files
    Last edited by cirrhus9.com; 13-08-2013, 02:03. Reason: solved
  • Colttt
    Senior Member
    Zabbix Certified Specialist
    • Mar 2009
    • 878

    #2
    please try "No"

    Code:
    (({db1_zoneC:mysql.slave.status.regexp("No")})#1)
    Debian-User

    Sorry for my bad english

    Comment

    • cirrhus9.com
      Member
      • Feb 2012
      • 58

      #3
      Colttt:

      I did as you suggested. No change.

      Thank you,No

      JJ

      Edit: Well, I just got this:
      Subject: db1_zoneC 01_MySQL Replication Status: PROBLEM
      01_MySQL Replication Status on db1_zoneC: PROBLEM Last Value: Yes

      Puzzled.

      Edit: So I changed the trigger to
      Code:
       (({db1_zoneC:mysql.slave.status.regexp("No")})#0)
      and we got a Recovered email with "Last Value: Yes" in it.

      07/15/2013 03:45:53 PM EDT
      seems to be working

      I'll give it a couple of days before marking as [SOLVED]
      Last edited by cirrhus9.com; 15-07-2013, 21:50.

      Comment

      Working...