Hello, We are trying to get Zabbix and MySQL monitoring working, but we ran into some problems. It did the following steps:
1. Created a template
2. Created a item in zabbix and added a key like mysql.uptime
3. Added a include in the agent like this:
4. Added in zabbix_agentd.userparams.conf te following lines:
5. Added in $HOME/.my.cnf the following lines:
6. Added a graph based on the item.
But I get the following error in /var/log/zabbix:
This usually means that the mysql server can not be connect. But if I login on the MySQL and try to login like this: mysql -uzabbix -p(Password) I can connect to the MySQL server succesfully.
Also if I run this command in the command line I get a valid response.
Reponse:
Did I miss something? Thank you in advance.
1. Created a template
2. Created a item in zabbix and added a key like mysql.uptime
3. Added a include in the agent like this:
Code:
Include=/etc/zabbix/zabbix_agentd.userparams.conf
Code:
UserParameter=mysql.uptime,mysqladmin -u zabbix --password=(Password) status | cut -f2 -d ":" | cut -f1 -d "T" | tr -d " "
Code:
[client] user = zabbix password = (Password) port = 3306
But I get the following error in /var/log/zabbix:
Code:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/srv/mysql/data/mysql.sock' (13)
Also if I run this command in the command line I get a valid response.
Code:
mysqladmin -u zabbix --password=(Password) status | cut -f2 -d ":" | cut -f1 -d "T" | tr -d " "
Code:
5052
Comment