In Zabbix 3.0.2, Template App MySQL is failing with status "unknown". This is a Plesk server and mysql is accessed like this:
# mysqladmin -u admin -p$(cat /etc/psa/.psa.shadow) ping
mysqld is alive
Notice admin is the username and the password is catted and encrypted in /etc/psa/.psa.shadow
In the agent on CentOS 7, there is /etc/zabbix/zabbix_agentd.d/userparameter_mysql.conf
Inside is:
UserParameter=mysql.ping,HOME=/var/lib/zabbix mysqladmin ping | grep -c alive
I've tried modifying that so that it includes the user/pass setup like this:
UserParameter=mysql.ping,HOME=/var/lib/zabbix mysqladmin -u admin -p$(cat /etc/psa/.psa.shadow) ping | grep -c alive
I've restarted the agent each time after also trying to escape the $
This still doesn't work. Any ideas what I am doing wrong here?
Thanks!
# mysqladmin -u admin -p$(cat /etc/psa/.psa.shadow) ping
mysqld is alive
Notice admin is the username and the password is catted and encrypted in /etc/psa/.psa.shadow
In the agent on CentOS 7, there is /etc/zabbix/zabbix_agentd.d/userparameter_mysql.conf
Inside is:
UserParameter=mysql.ping,HOME=/var/lib/zabbix mysqladmin ping | grep -c alive
I've tried modifying that so that it includes the user/pass setup like this:
UserParameter=mysql.ping,HOME=/var/lib/zabbix mysqladmin -u admin -p$(cat /etc/psa/.psa.shadow) ping | grep -c alive
I've restarted the agent each time after also trying to escape the $
This still doesn't work. Any ideas what I am doing wrong here?
Thanks!
Comment