H
H
huko2015-01-07 03:10:23
Zabbix
huko, 2015-01-07 03:10:23

Zabbix. How to create 1 trigger for 2 variables like SNMP trap and SNMP agent?

Help solve the problem.
There are 2 Items:
A1 - type SNMPv2 agent, interval - 300 sec
A2 - type SNMP trap
Both are related to the state of the LinkUp/LinkDown port. You need to create 1 trigger for the LinkDown event that will work immediately if trap A2 arrives, and if trap does not reach, then during the next check A1 will transfer the trigger to the PROBLEM state. Well, in the opposite direction, we translate into OK through the A2 LinkUp ladder or through the next A1 poll.
Separately, everything works, but the task is exactly 1 trigger for two events, with the possibility of a safety net if for some reason the trap does not reach.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Puma Thailand, 2015-01-07
@opium

use last

H
huko, 2015-01-07
@huko

(({TRIGGER.VALUE}=0 and {Int:snmptrap["(linkUp|linkDown)"].str(linkDown)}=1) or 
({TRIGGER.VALUE}=0 and {Int oper:ifOperStatus[{#IFDESCR}].last()}<>1)) or 
(({TRIGGER.VALUE}=1 and {Int:snmptrap["(linkUp|linkDown)"].str(linkDown)}<>1) or 
({TRIGGER.VALUE}=1 and {Int oper:ifOperStatus[{#IFDESCR}].last()}=1))

With this option, if the interface rises but does not reach the trap about raising the interface - i.e. there will be a record that it is Down, then the trigger will start twitching PROBLEM / OK every 5 minutes ..

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question