I have got to be doing something silly somewhere. I have these UserParameters on all my MySQL agents:
That works as expected.
Good. Now, I'm trying to figure out how to make that work as a monitor. I've tried this expression in my new trigger...
... to which I get ...
Please help me save a few hairs on my head on this one. :-)
Code:
UserParameter=mysql.replication.slave_io_status[*],mysql --defaults-file=/var/lib/zabbix/.my.cnf -e 'show slave status\G' | grep 'Slave_IO_Running:' | sed -e 's/Yes/1/' -e 's/No/0/' | cut -d: -f2- | cut -d' ' -f2- UserParameter=mysql.replication.slave_sql_status[*],mysql --defaults-file=/var/lib/zabbix/.my.cnf -e 'show slave status\G' | grep 'Slave_SQL_Running:' | sed -e 's/Yes/1/' -e 's/No/0/' | cut -d: -f2- | cut -d' ' -f2-
Code:
zabbix_agentd -t mysql.replication.slave_io_status mysql.replication.slave_io_status [t|1]
Code:
last(/MySQL by Zabbix agent/mysql.replication.slave_sql_status["{$MYSQL.HOST}","{$MYSQL.PORT}"])=0
Code:
Incorrect item key "mysql.replication.slave_sql_status["{$MYSQL.HOST}","{$MYSQL.PORT}"]" provided for trigger expression on "MySQL by Zabbix agent".
Comment