I
I
Ivan2014-11-26 06:47:10
Zabbix
Ivan, 2014-11-26 06:47:10

How to check the value of a custom macro in a trigger (not firing the trigger depending on the value of the macro)?

There are nodes with multiple interfaces. There are no agents on the nodes, monitoring is done by a simple check, ping to the specified interface addresses.
Interface addresses are written by macros in the nodes themselves.
There are triggers like:
{GW_Monitorings:icmpping[{$GW_WAN1},3].max(120)}=0
{GW_Monitorings:icmpping[{$GW_WAN2},3].max(120)}=0
And so on.
Problem:
if a node has one interface, then the second one fails.
The template is assigned to a bunch of machines.
A check is required in the trigger: if $GW_WAN2 is not set, or a certain value is set (previously fixed, indicating that there is no second interface), then during the trigger execution, the $GW_WAN2 macro is checked and if the second interface is missing, the trigger does not work.
Now, if the $GW_WAN2 value is empty, the trigger fires, because cannot ping an empty value.
Specifying 127.0.0.1 is also not an option, because these triggers are a condition for others (i.e., in others, you will also have to check for the value of the $GW_WAN2 macro).
a stupid check in a trigger like:
{$GW_WAN2}=0 does not work, what options are there and are there any at all?
PS The general goal is to check a live vpn connection with at least 1 live WAN, in the case of 127.0.0.1 it will not be possible to understand that there are no live WANs.
General system with templates, trigger dependencies and more.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question