Hello,
I've been trying to tackle this problem for a few days and I cant seem to get
anywhere. Basically it seems calling the Userparam is ignoring the $HOME/.my.cnf
file which contains the password for zabbix account.
Zabbix 1.8.11, Archlinux
Here is the cmd I'm running.
If I run that by hand it works fine. If I run the
'zabbix_agentd -t mysql.replicate.slave.secbehind' AS the zabbix user (su zabbix -) locally it works fine.
If I run 'zabbix_get -s hostname.net -k mysql.replicate.slave.secbehind' from
the zabbix server I get the ZBX_NOTSUPPORTED with the error logged as
I don't want to put the password on the CLI for the obvious reasons.
The above proves its working as the zabbix user.
Any light you can shed on this would be most welcomed
Thanks much!
-Erik-
I've been trying to tackle this problem for a few days and I cant seem to get
anywhere. Basically it seems calling the Userparam is ignoring the $HOME/.my.cnf
file which contains the password for zabbix account.
Zabbix 1.8.11, Archlinux
Here is the cmd I'm running.
Code:
UserParameter=mysql.replicate.slave.secbehind,HOME=/home/zabbix echo 'show slave status\G'| mysql | grep Seconds_Behind_Master | cut -d : -f2 | sed s/NULL/10000000/ |tr -d " "
'zabbix_agentd -t mysql.replicate.slave.secbehind' AS the zabbix user (su zabbix -) locally it works fine.
If I run 'zabbix_get -s hostname.net -k mysql.replicate.slave.secbehind' from
the zabbix server I get the ZBX_NOTSUPPORTED with the error logged as
Code:
ERROR 1045 (28000): Access denied for user 'zabbix'@'localhost' (using password: NO)
Code:
mysql --print-defaults mysql would have been started with the following arguments: --port=3306 --socket=/var/run/mysqld/mysqld.sock --default-character-set=utf8 --ssl --ssl-ca=/etc/mysql/ssl/ca-cert.pem --ssl-capath=/etc/mysql/ssl --ssl-cert=/etc/mysql/ssl/client-cert.pem --ssl-key=/etc/mysql/ssl/client-key.pem --no-auto-rehash --default-character-set=utf8 --user=zabbix --password=xxxxx
Any light you can shed on this would be most welcomed
Thanks much!
-Erik-
Comment