Monitoring MySQl with Zabbix Agent

pico picture pico · Jan 15, 2016 · Viewed 17.5k times · Source

I can't get every result from the Zabbix default Template App MySQL. The error is:

Not supported by zabbix agent

I already setup zabbix_agent.conf and included my.cnf. What other settings do I need to configure, for Zabbix Agent to monitor MySQL Server?

Answer

Mugiwara picture Mugiwara · May 31, 2016
  1. Check that your zabbix_server config file is including the /etc/zabbix/zabbix_agentd.d/*.conf :

    vi /etc/zabbix/zabbix_agentd.conf
    

    (you will find at almost the end of file: Include =/etc/zabbix/zabbix_agentd.d/*.conf)

  2. Check where your zabbix_mysql config is :

    vim /etc/zabbix/zabbix_agentd.d/userparameter_mysql.conf
    
  3. If you'll find it for example: HOME=/var/lib/zabbix then create that directory if it does not exist:

    mkdir /var/lib/zabbix
    
  4. change your position to that directory and create/edit .my.cnf file:

    cd /var/lib/zabbix
    vim .my.cnf
    

    add the following :

    [mysql]
    user=zabbix
    password=zabbix
    host=localhost
    
    [mysqladmin]
    user=zabbix
    password=zabbix
    host=localhost
    

    Then save.

I presume you already have a mysql username=zabbix and password=zabbix with all privileges.

Restart mysql:

    service mysqld restart

Now connect to your zabbix gui and check the values coming from mysql (Monitoring--> Latest data)