Closed dominicpratt closed 2 years ago
Hi Dominic,
You seems to have added user parameter for Mysql.Slave-status instead of Mysql.Server-Status.
Please add following in your zabbix agent config file. Also, please make sure /etc/zabbix/.my.cnf is configured well. Your --defaults-group-suffix should be passed correctly as per configuration
UserParameter=Mysql.Server-Status, mysql --defaults-file=/etc/zabbix/.my.cnf --defaults-group-suffix=_monitoring -N -e "show global status" | jq -c '. | split("\n")[:-1] | map (split("\t") | {(.[0]) : .[1]} ) | add ' -R -s
And then test following- zabbix_agentd -t Mysql.Server-Status
Hi @nitzien
zabbix-agent2 1:5.0.2-1+bionic amd64 Zabbix network monitoring solution - agent
I created a userparameter_mysql.conf
file in /etc/zabbix/zabbix_agent2.d
with:
UserParameter=Mysql.Server-Status, mysql --defaults-file=/etc/zabbix/.my.cnf --defaults-group-suffix=_monitoring -N -e "show global status" | jq -c '. | split("\n")[:-1] | map (split("\t") | {(.[0]) : .[1]} ) | add ' -R -s
/etc/zabbix/.my.cnf
exists and contains credentials for the zabbix MySQL user and mysql --defaults-file=/etc/zabbix/.my.cnf --defaults-group-suffix=_monitoring -N -e "show global status" | jq -c '. | split("\n")[:-1] | map (split("\t") | {(.[0]) : .[1]} ) | add ' -R -s
returns a bunch of data.
But...
# zabbix_agent2 -t Mysql.Server-Status
Mysql.Server-Status [m|ZBX_NOTSUPPORTED] [Unknown metric Mysql.Server-Status]
What would be missing?
More information:
zabbix_get -s 127.0.0.1 -k Mysql.Server-Status
returns a bunch of data.
Now I need to understand why nothing's being displayed in the widget for the monitored host...
Is your agent configured for active or passive mode?
Regards, Nitin
On Thu, Aug 20, 2020, 7:18 PM manu-p notifications@github.com wrote:
More information:
zabbix_get -s 127.0.0.1 -k Mysql.Server-Status returns a bunch of data.
Now I need to understand why nothing's being displayed in the widget for the monitored host...
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nitzien/zabbix-misc/issues/6#issuecomment-677675255, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEBZMD6YTNLEHC2ROXWTX3SBUSTBANCNFSM4KKBVVDQ .
Active @nitzien , but I found the reason: Iwas not using the correct MySQL Template... Apologies!
Thanks for the work!
Good morning,
unfortunately the template does not work for me. I get the error message:
/etc/zabbix/zabbix_agentd.d/userparameter_mysql.conf:
Zabbix Version 4.4.4 on Debian Buster.
Can somebody point me to the right direction?
Thanks, Dominic