select triggerid,expression,description,value,from_unixtime(lastchange ,‘%Y%m%d %H:%i:%S‘) from triggers where triggerid=‘6347‘;
+-----------+------------+----------------------------------------------------------+-------+----------------------------------------------+
| triggerid | expression | description | value | from_unixtime(lastchange ,‘%Y%m%d %H:%i:%S‘) |
+-----------+------------+----------------------------------------------------------+-------+----------------------------------------------+
| 6347 | {10832}=1 | Zabbix agent on {HOST.NAME} is unreachable for1 minutes | 1 | 20140312 11:47:31 |
+-----------+------------+----------------------------------------------------------+-------+----------------------------------------------+
select * from functions where itemid=‘27731‘;
+------------+--------+-----------+----------+-----------+
| functionid | itemid | triggerid | function | parameter |
+------------+--------+-----------+----------+-----------+
| 10832 | 27731 | 6347 | nodata | 1m |
+------------+--------+-----------+----------+-----------+select alertid,actionid,eventid,from_unixtime(clock,‘%Y%m%d %H:%i:%S‘),message from alerts where message like ‘hostname%‘; | 468566 | 5 | 3256580 | 20140312 09:04:02 | hostname:/apps/svr/zabbix_server/scripts/zabbix_exec_command.py ip 23500 "Agent ping" hostname agent.ping Up (1) PROBLEM | | 468567 | 5 | 3256580 | 20140312 09:06:03 | hostname:/apps/svr/zabbix_server/scripts/zabbix_exec_command.py ip 23500 "Agent ping" hostname agent.ping Up (1) PROBLEM
/apps/svr/zabbix_server/scripts/zabbix_exec_command.py ip 27731 "Agent ping" hostname agent.ping Up (1) PROBLEM -bash: syntax error near unexpected token `(‘脚本输入参数的顺序:ip,itemid,itemname,hostname,itemkey,itemvalue,triggerstatus,出问题的时itemvalue字段,因为没有用引号,导致脚本运行出错,fix下脚本就可以了。。。
5009:20140312:113302.211 In zbx_format_value() 5009:20140312:113302.211 In replace_value_by_map() value:‘1‘ valuemapid:10 5009:20140312:113302.211 query [txnlev:1] [select newvalue from mappings where valuemapid=10 and value=‘1‘] 5009:20140312:113302.211 End of replace_value_by_map() value:‘Up (1)‘
本文出自 “菜光光的博客” 博客,请务必保留此出处http://caiguangguang.blog.51cto.com/1652935/1374374
zabbix value map导致报警失效问题一例,布布扣,bubuko.com
原文:http://caiguangguang.blog.51cto.com/1652935/1374374