Ad Widget

Collapse

Stock MySQL Template Ping Issue

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Okiepilgrim
    Junior Member
    • Mar 2015
    • 1

    #1

    Stock MySQL Template Ping Issue

    I didn't see any others posts on this, so maybe we're a unique flower, but we were seeing issues with the default "Template App MySQL", where a stopped mysql server would simply return no data for the MySQL status (mysql.ping) item and therefore the "MySQL is down" trigger would not alert properly.

    Best I can tell this was related to the fact that there was a bunch of stderr spit out by mysqladmin when the actual service was stopped (i.e. not "failed") and this caused the item to not update since it was expecting a decimal value (0 or 1) and got a bunch of text.

    We solved it by updating the "mysql.ping" item (in userparameter_mysql.conf) from:
    UserParameter=mysql.ping,HOME=/var/lib/zabbix mysqladmin ping | grep -c alive
    to:
    UserParameter=mysql.ping,HOME=/var/lib/zabbix mysqladmin ping 2>&1 | grep -c alive

    (i.e. redirecting stderr to stdout _before_ the grep)

    We're running zabbix 2.4.4 server/agent
    Server on ubuntu 14.04 and agents are 12.04(mostly) / 14.04

    Hope it helps someone.
Working...