Take the following situation:
- zabbixserver: httpd, mysql-server, zabbix 2.2.11 with local database
- databaseserver: mysql-server
- zabbixserver monitors the local mysql database correctly.
- zabbixserver reports that mysql on the databaseserver is down, while it is up
- zabbixserver reports for other services on the databaseserver work OK
I've done the following to get this working, following this guide. On the databaseserver the zabbix-agent is installed, which reports to the zabbixserver.
- created zabbixuser with usage grants on all databases and flushed privileges
- created
/etc/zabbix/.my.cnf
The file /etc/zabbix/.my.cnf
is ignored. If I put it in /etc/zabbix/zabbix_agentd.d
it is used.
[mysql]
user=zabbixuser
password=123456
[mysqladmin]
user=zabbixuser
password=123456
This .my.cnf has two profiles: mysql and mysqladmin, but I don't see where these are linked and why I should use these. Restarting the zabbix-agent results in an error.
Starting Zabbix agent: zabbix_agentd [12334]: invalid entry [[mysql]] (not following "parameter=value" notation) in config file [/etc/zabbix/zabbix_agentd.d//.my.cnf], line 1
The /var/log/zabbix/zabbix_agentd.log
reports this:
1077:20151125:170718.508 active check configuration
update from [10.2.3.4:10051] started to fail
(cannot connect to [[10.2.3.4]:10051]: [4] Interrupted system call)
mysqladmin: unknown variable 'USER=zabbixuser'
mysql: unknown variable 'USER=zabbixuser'
What is wrong with this configuration?