Template MySQL didn't get result in Zabbix -


i'm planning use temple mysql monitor mysql detail instances. unfortunatelly can't result. still missing in configuration. check out zabbix-agent log piece of log not whole log.

xecute_str() command:'/usr/lib/zabbix/externalscripts/mysql_check.pl' len:0 cmd_result:''  28786:20160121:141008.072 sending []  28786:20160121:141008.072 listener #2 [waiting connection]  28788:20160121:141008.648 in send_buffer() host:'127.0.0.1' port:10051 values:0/100  28788:20160121:141008.648 end of send_buffer():succeed  28788:20160121:141008.648 active checks #1 [idle 1 sec]  28784:20160121:141008.795 collector [processing data]  28784:20160121:141008.796 in update_cpustats()  28784:20160121:141008.796 end of update_cpustats()  28784:20160121:141008.796 collector [idle 1 sec]  28785:20160121:141009.075 listener #1 [processing request]  28785:20160121:141009.075 requested [mysql[root,qwestions,lld]] 

1. add special user mysql:

example:

grant usage on *.* 'zabbix'@'%' identified 'superpassword'; flush privileges; 

2. add user params zabbix-agent configuration

edit /etc/zabbix/zabbix_agentd.conf

userparameter=mysql.version,mysql -v userparameter=mysql.status[*],echo "show global status variable_name='$1';" | home=/etc/zabbix mysql -n | awk '{print $$2}' userparameter=mysql.ping,home=/etc/zabbix mysqladmin ping | grep -c alive # 'sum' on data_length or index_length alone needed when getting information whole database instead of single table userparameter=mysql.size[*],echo "select sum($(case "$3" in both|"") echo "data_length+index_length";; data|index) echo "$3_length";; free) echo "data_free";; esac)) information_schema.tables$([[ "$1" = "all" || ! "$1" ]] || echo " table_schema='$1'")$([[ "$2" = "all" || ! "$2" ]] || echo "and table_name='$2'");" | home=/etc/zabbix mysql -n 

if want extend monitoring items add userparameter proper sql-query

3. add auth-file mysql:

create .my.cnf file /etc/zabbix/

[client] user = zabbix password = superpassword 

4. restart agent (and zabbix-proxy if use it)


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -