I am setting up trap alerts and all is well - the traps match ok, but I want to send e-mail when a trap is received and I want to include the trap varbinds in the e-mail... only the varbinds. I usually use {ITEM.VALUE} for similar things, but currently the {ITEM.VALUE} prints also the "PDU INFO:", which includes the community of the rtap and other stuff that the recipients must not see.
I have tried to match snmptrap[VARBIND.*] as item key, also snmptrap[^VARBIND.*] the regex matches, but the ITEM.VALUE still shows the PDU INFO.
Can anyone help with a tip? How do I tell Zabbix to get only the VARBINDS.* portion of the trap?
Here is what the perl script writes in the trap log file:
PDU INFO:
notificationtype TRAP
version 1
receivedfrom UDP: [xxxxxxxx]:51860->[xxxxxxxxxx]:162
errorstatus 0
messageid 0
community xxxxxxxxxxx
transactionid 12
errorindex 0
requestid 230467315
VARBINDS:
DISMAN-EVENT-MIB::sysUpTimeInstance type=67 value=Timeticks: (0) 0:00:00.00
SNMPv2-MIB::snmpTrapOID.0 type=6 value=OID: SNMPv2-SMI::enterprises.2.6.190.3
and this is what I see in the Last value for the item.
Thanks,
Georgi
I have tried to match snmptrap[VARBIND.*] as item key, also snmptrap[^VARBIND.*] the regex matches, but the ITEM.VALUE still shows the PDU INFO.
Can anyone help with a tip? How do I tell Zabbix to get only the VARBINDS.* portion of the trap?
Here is what the perl script writes in the trap log file:
PDU INFO:
notificationtype TRAP
version 1
receivedfrom UDP: [xxxxxxxx]:51860->[xxxxxxxxxx]:162
errorstatus 0
messageid 0
community xxxxxxxxxxx
transactionid 12
errorindex 0
requestid 230467315
VARBINDS:
DISMAN-EVENT-MIB::sysUpTimeInstance type=67 value=Timeticks: (0) 0:00:00.00
SNMPv2-MIB::snmpTrapOID.0 type=6 value=OID: SNMPv2-SMI::enterprises.2.6.190.3
and this is what I see in the Last value for the item.
Thanks,
Georgi
Comment