Hello,
I'm trying to make a trigger using regular expression to work on a log type item.
This is my trigger:
{router.pontonet.com:snmptrap["ifIndex[[
rint:]]*: 5"].regexp("linkDown[[:ascii:]]*ifOperStatus[[
rint:]]*1$")}=1
Using a online regular expression tester, it found matches however inside Zabbix nothing is found.
This is my server returning 0 matches:
22119:20140820:181231.428 In evaluate_function() function:'router.pontonet.com:snmptrap["ifIndex[[
rint:]]*: 5"].regexp("linkDown[[:ascii:]]*ifOperStatus[[
rint:]]*1$")'
22119:20140820:181231.428 In evaluate_STR()
22119:20140820:181231.428 In get_function_parameter_str() parameters:'"linkDown[[:ascii:]]*ifOperStatus[[
rint:]]*1$"' Nparam:1
22119:20140820:181231.428 In substitute_simple_macros() data:'linkDown[[:ascii:]]*ifOperStatus[[
rint:]]*1$'
22119:20140820:181231.428 get_function_parameter_str() value:'linkDown[[:ascii:]]*ifOperStatus[[
rint:]]*1$'
22119:20140820:181231.428 End of get_function_parameter_str():SUCCEED
22119:20140820:181231.428 In zbx_vc_get_value_range() itemid:66495 value_type:2 seconds:0 count:1 timestamp:1408572746
22119:20140820:181231.428 End of zbx_vc_get_value_range():SUCCEED count:1 cached:1
22119:20140820:181231.428 End of evaluate_STR():SUCCEED
22119:20140820:181231.429 End of evaluate_function():SUCCEED value:'0'
22119:20140820:181231.429 End of zbx_evaluate_item_functions()
This is my item value:
18:12:26 2014/08/20 PDU INFO:
notificationtype TRAP
version 1
receivedfrom UDP: [172.16.0.1]:41790->[172.16.0.10]
errorstatus 0
messageid 0
community public
transactionid 142
errorindex 0
requestid 676841579
VARBINDS:
DISMAN-EVENT-MIB::sysUpTimeInstance type=67 value=Timeticks: (8176147) 22:42:41.47
SNMPv2-MIB::snmpTrapOID.0 type=6 value=OID: IF-MIB::linkDown
IF-MIB::ifIndex type=2 value=INTEGER: 5
IF-MIB::ifAdminStatus type=2 value=INTEGER: 2
IF-MIB::ifOperStatus type=2 value=INTEGER: 1
Glad if you may help me.
Thanks in advance,
Pedro
I'm trying to make a trigger using regular expression to work on a log type item.
This is my trigger:
{router.pontonet.com:snmptrap["ifIndex[[
rint:]]*: 5"].regexp("linkDown[[:ascii:]]*ifOperStatus[[
rint:]]*1$")}=1Using a online regular expression tester, it found matches however inside Zabbix nothing is found.
This is my server returning 0 matches:
22119:20140820:181231.428 In evaluate_function() function:'router.pontonet.com:snmptrap["ifIndex[[
rint:]]*: 5"].regexp("linkDown[[:ascii:]]*ifOperStatus[[
rint:]]*1$")' 22119:20140820:181231.428 In evaluate_STR()
22119:20140820:181231.428 In get_function_parameter_str() parameters:'"linkDown[[:ascii:]]*ifOperStatus[[
rint:]]*1$"' Nparam:1 22119:20140820:181231.428 In substitute_simple_macros() data:'linkDown[[:ascii:]]*ifOperStatus[[
rint:]]*1$' 22119:20140820:181231.428 get_function_parameter_str() value:'linkDown[[:ascii:]]*ifOperStatus[[
rint:]]*1$' 22119:20140820:181231.428 End of get_function_parameter_str():SUCCEED
22119:20140820:181231.428 In zbx_vc_get_value_range() itemid:66495 value_type:2 seconds:0 count:1 timestamp:1408572746
22119:20140820:181231.428 End of zbx_vc_get_value_range():SUCCEED count:1 cached:1
22119:20140820:181231.428 End of evaluate_STR():SUCCEED
22119:20140820:181231.429 End of evaluate_function():SUCCEED value:'0'
22119:20140820:181231.429 End of zbx_evaluate_item_functions()
This is my item value:
18:12:26 2014/08/20 PDU INFO:
notificationtype TRAP
version 1
receivedfrom UDP: [172.16.0.1]:41790->[172.16.0.10]
errorstatus 0
messageid 0
community public
transactionid 142
errorindex 0
requestid 676841579
VARBINDS:
DISMAN-EVENT-MIB::sysUpTimeInstance type=67 value=Timeticks: (8176147) 22:42:41.47
SNMPv2-MIB::snmpTrapOID.0 type=6 value=OID: IF-MIB::linkDown
IF-MIB::ifIndex type=2 value=INTEGER: 5
IF-MIB::ifAdminStatus type=2 value=INTEGER: 2
IF-MIB::ifOperStatus type=2 value=INTEGER: 1
Glad if you may help me.
Thanks in advance,
Pedro