Hi.
I've made a new deployment of Zabbix 4.2 and it's working great. I've just a problem with a single linux host for which I'm unable to monitor MySQL. I have another twin machine for which works perfectly, on this single server I'm unable to make it work!
If I manually test the item it works:
# zabbix_agentd -t mysql.status[Com_begin]
mysql.status[Com_begin] [t|2]
If I test if from zabbix user with sudo or su it returns the correct value. But when run by zabbix agent:
25258:20190614:105750.418 EXECUTE_STR() command:'echo "show global status where Variable_name='Uptime';" | HOME=/var/lib/zabbix mysql -N | awk '{print $2}'' len:103 cmd_result:'ERROR 2002 (HY000): '
25258:20190614:105750.418 Sending back [ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)]
again manually running the commands shown in the debug return the correct value.
I cannot really understand what's different in zabbix agent daemon which makes it fail!
Any hint is welcome.
[root@SRVTN012 zabbix_agentd.d]# cat /etc/centos-release
CentOS Linux release 7.6.1810 (Core)
[root@SRVTN012 zabbix_agentd.d]# zabbix_agentd -V
zabbix_agentd (daemon) (Zabbix) 4.2.3
Revision 3685611ba5 5 June 2019, compilation time: Jun 7 2019 10:27:34
Copyright (C) 2019 Zabbix SIA
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it according to
the license. There is NO WARRANTY, to the extent permitted by law.
This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.openssl.org/).
Compiled with OpenSSL 1.0.1e-fips 11 Feb 2013
Running with OpenSSL 1.0.1e-fips 11 Feb 2013
I've made a new deployment of Zabbix 4.2 and it's working great. I've just a problem with a single linux host for which I'm unable to monitor MySQL. I have another twin machine for which works perfectly, on this single server I'm unable to make it work!
If I manually test the item it works:
# zabbix_agentd -t mysql.status[Com_begin]
mysql.status[Com_begin] [t|2]
If I test if from zabbix user with sudo or su it returns the correct value. But when run by zabbix agent:
25258:20190614:105750.418 EXECUTE_STR() command:'echo "show global status where Variable_name='Uptime';" | HOME=/var/lib/zabbix mysql -N | awk '{print $2}'' len:103 cmd_result:'ERROR 2002 (HY000): '
25258:20190614:105750.418 Sending back [ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)]
again manually running the commands shown in the debug return the correct value.
I cannot really understand what's different in zabbix agent daemon which makes it fail!
Any hint is welcome.
[root@SRVTN012 zabbix_agentd.d]# cat /etc/centos-release
CentOS Linux release 7.6.1810 (Core)
[root@SRVTN012 zabbix_agentd.d]# zabbix_agentd -V
zabbix_agentd (daemon) (Zabbix) 4.2.3
Revision 3685611ba5 5 June 2019, compilation time: Jun 7 2019 10:27:34
Copyright (C) 2019 Zabbix SIA
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it according to
the license. There is NO WARRANTY, to the extent permitted by law.
This product includes software developed by the OpenSSL Project
for use in the OpenSSL Toolkit (http://www.openssl.org/).
Compiled with OpenSSL 1.0.1e-fips 11 Feb 2013
Running with OpenSSL 1.0.1e-fips 11 Feb 2013
Comment