Hi,
We are currently using Zabbix v2.0 and we have a number of UserParameter definitions which emit integers perfectly.
Today I would like one to emit a text string instead: a Yes or a No:
UserParameter=mysql.slave_status[*],mysql -u XXX -XXX -Bse "show slave status\G" | awk -F: -v var=$1 '{ if ( $1 ~ var ) {print "data:"$$2} }'
If I run this in the command (with $1 as Slave_IO_Running) I get:
data:Yes
However if I execute zabbix_get -s testhost -k mysql.slave_status["Slave_IO_Running"] on my Zabbix server I get no output
On the client I get this:
[root@ams-mysqlwell-03 zabbix_agentd.d]# zabbix_agent -t mysql.slave_status[Slave_IO_Running]
mysql.slave_status[Slave_IO_Running] [t|]
My item configuration looks like this:
Please could someone explain what I am doing wrong?
We are currently using Zabbix v2.0 and we have a number of UserParameter definitions which emit integers perfectly.
Today I would like one to emit a text string instead: a Yes or a No:
UserParameter=mysql.slave_status[*],mysql -u XXX -XXX -Bse "show slave status\G" | awk -F: -v var=$1 '{ if ( $1 ~ var ) {print "data:"$$2} }'
If I run this in the command (with $1 as Slave_IO_Running) I get:
data:Yes
However if I execute zabbix_get -s testhost -k mysql.slave_status["Slave_IO_Running"] on my Zabbix server I get no output
On the client I get this:
[root@ams-mysqlwell-03 zabbix_agentd.d]# zabbix_agent -t mysql.slave_status[Slave_IO_Running]
mysql.slave_status[Slave_IO_Running] [t|]
My item configuration looks like this:
Please could someone explain what I am doing wrong?
Comment