Ad Widget

Collapse

MySQL Template: Authentication issues

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rks
    Junior Member
    • Aug 2015
    • 6

    #1

    MySQL Template: Authentication issues

    Env:
    Zabbix Agent 2.0
    Host: CentOS 6.5 (running MariaDB 5.5.x)

    On the host:
    1) I have configured the agent and am running it in both active and passive modes
    2) I have the MySQL credentials file /etc/zabbix/.my.cnf:
    Code:
    [mysql]
    user=zabbix
    password=SecretCode
    [mysqladmin]
    user=zabbix
    password=SecretCode
    On server:
    I have linked the MySQL template to the host.

    Problem:
    The agent fails to authenticate with mysql (mariadb) despite the .my.cnf file.
    If I specify the credentials in the UserParameters as in:
    Code:
      UserParameter=mysql.status[*],echo "show global status where Variable_name='$1';" | HOME=/var/lib/zabbix mysql -u zabbix -pSecretCode  -N | awk '{print $$2}'
    then it works.

    The second problem is that mysql.ping trigger issues an alarm when the server goes down but does not issue a recovery notification when the server comes back up.

    What could be the root cause of these problems?

    Thanks,

    /Kobe
    Last edited by rks; 03-09-2015, 01:39. Reason: Typos
  • gleepwurp
    Senior Member
    • Mar 2014
    • 119

    #2
    Hi Rks,

    your .my.cnf file should be in your zabbix's home directory, not zabbix's Configuration directory.

    That being said, if you put in your .my.sql in Zabbix's agent HOME directory, this should work.

    For your second question, do you mean that the trigger never clears? or that you don't get a "recovery" notification?

    G.

    Comment

    Working...