N
N
notalonelobzik2021-02-08 19:13:58
SNMP
notalonelobzik, 2021-02-08 19:13:58

Zabbix. Separation of item prototypes in one template. How to filter?

The bottom line is this: there are two patterns, there are detection rules in each of them. One template uses the filter {#IFDESCR} = ^Loopback102$, the other uses {#IFDESCR} = ^Vlan1$. Accordingly, for your template - your prototypes, but the search key cannot be used twice. If the interfaces key is used in one template, then the iftable key must be used in the second - this imposes restrictions and inconveniences.
For example, if you need to add more templates for any interfaces.
The question is: can I somehow separate the prototypes within one template so that one interface is used one, and another one is used for another? I created two regular expressions, but if you filter with "OR", the prototypes apply to both interfaces. Is it feasible at all?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
iddqda, 2021-02-09
@notalonelobzik

I didn’t quite understand the question, maybe just make the filter for the detection rule such that both types of interfaces pass

{#IFDESCR} = ^Loopback102$ | ^Vlan1$

Or do you need different prototypes for different types of interfaces? (I really don’t understand what for?)
then two identical detection rules (with a different name and key, of course) in one template,
in one rule set the filter ^Loopback102$, and in the other ^Vlan1$
well, different prototypes for different rules,
and you can also filter by ifType :
discovery[{#IFDESCR}, ifDescr, {#IFTYPE}, ifType]

ifType = 6 for ethernet and 24 for loopback

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question