Ad Widget

Collapse

Template Mysql

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rubendob
    Member
    • Apr 2012
    • 36

    #1

    Template Mysql

    hi all

    inside template mysql there are few items and triggers and of them I particularly useless. But sure is because there is something simply I did not understand.

    Is this:

    mysql.ping

    this item gets the value of UserParameter

    Code:
    UserParameter=mysql.ping,HOME=/etc/zabbix mysqladmin ping | grep -c alive
    If mysql server is running ok it gets a 1. Host is ok, graphs working, perfect. But if your mysql server goes down this item gets:
    Code:
    mysqladmin: connect to server at 'localhost' failed
    error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
    Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
    0
    item because unsupported and trigger is not updated. So I never get the mail of the action.

    What I'm doing wrong here?
  • guzzijason
    Senior Member
    • Dec 2015
    • 106

    #2
    I don't think you're doing anything wrong, but I do think this may be a bug in the bundled userparameter_mysql.conf file.

    I think this:

    UserParameter=mysql.ping,HOME=/etc/zabbix mysqladmin ping | grep -c alive

    Should be change to this, in order to suppress STDERR:

    UserParameter=mysql.ping,HOME=/etc/zabbix mysqladmin ping 2>/dev/null | grep -c alive

    I just recently started using the mysql template myself, and haven't noticed this one before. I'm going to go back and update my own userparameters.

    __Jason

    Comment

    Working...