Monitoring MySQl with Zabbix Agent
Asked Answered
C

1

5

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?

Cyn answered 15/1, 2016 at 6:4 Comment(1)
What happens when you test a MySQL item using "zabbix_agentd -t ..."? Does it work? Are you using the correct agent configuration file (it should be zabbix_agentd.conf instead of zabbix_agent.conf)? What user parameter definitions have you included there?Vive
N
7
  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)

Nealey answered 31/5, 2016 at 15:9 Comment(5)
mysql restart is not neededChaisson
@Chaisson Instead it's required to restart the Zabbix agent, eh?Insomniac
If anything need restarting, yes, it would be the zabbix-agentd processChaisson
Changing .my.cnf requires a restartNealey
Changing .my.cnf does not require restarting anything. Changing agent config file requires restarting the agent. At no time MySQL should be restarted with the given steps.Grams

© 2022 - 2024 — McMap. All rights reserved.