Configuring low-level discovery in Zabbix

Low-level discovery allows you to automatically create data items, triggers, graphics.
Massively it is better not to use it, since in practice it noticed that it gives a significant load on the system.

Here is an example of the discovery configuration for viewing the port load of the managed switch.
To start, open the “Settings” – “Templates“, create a new template, or click “Discovery“.
Click “Create rule” and fill out the main parameters:

Name: Interaces
Type: SNMPv2 agent
Key: snmp.discovery
SNMP OID: ifDescr
SNMP community: public
Port: 161

The second step is to create a prototype data element:

Name: ifInOctets.$1
Type: SNMPv2 agent
Key: ifInOctets.["{#SNMPINDEX}"]
SNMP OID: ifInOctets.{#SNMPINDEX}
SNMP community: public
Port: 161
Type of information: Numeric (float)
Units: B
Use custom multiplier: 8
Store value: Delta (speed per second)
New aplication: ifInOctets

Example of creating a prototype of a trigger:

Name: ifOperStatus.{#SNMPINDEX} on {HOST.HOST} was changed
Expression: {template name:ifOperStatus.["{#SNMPINDEX}"].diff()}=1

In new versions of Zabbix, instead of $1-9, you can use, for example, {#SNMPINDEX} {#SNMPVALUE}

Instead “ifInOctets” similarly you can use for example: ifOutOctets, ifInErrors, ifOutErrors, ifInDiscards, ifOutDiscards, ifOperStatus etc.

When creating a graph in the name, we write for example “Traffic Port {#SNMPINDEX}” and add to the Item, for example, two data elements responsible for the incoming (ifInOctets) and outgoing traffic (ifOutOctets).

I will give another example of ONU signal levels for BDCOM OLT (you need to run it once a day, preferably at night, so as not to load the CPU of the device):

Rule:
discovery[{#SNMPVALUE},IF-MIB::ifDescr]

Item:
Signal level on interface $1
SNMPv2-SMI::enterprises.3320.101.10.5.1.5.{#SNMPINDEX}

Graph:
Signal {#SNMPVALUE}
BDCOM P3310 ixnfo.com: Signal level on interface $1
Rule:
discovery[{#IFDESCR},IF-MIB::ifDescr, {#IFALIAS},IF-MIB::ifAlias]

Item name:Signal level on interface $1
Item key: rx_signal.[{#IFDESCR}]
SNMP OID: SNMPv2-SMI::enterprises.3320.101.10.5.1.5.{#SNMPINDEX}

Trigger name: ONU RX signal < -25 {#IFDESCR} ({#IFALIAS})
Trigger:
last(/BDCOM P3310 ixnfo.com/rx_signal.[{#IFDESCR}])<-25.0000
and
last(/BDCOM P3310 ixnfo.com/rx_signal.[{#IFDESCR}])>-36.0000

Graph:
Signal {#IFDESCR} {#IFALIAS}
BDCOM P3310 ixnfo.com: Signal level on interface $1

See also my articles:
SNMP OID and MIB for interfaces
Custom intervals in Zabbix

Leave a comment

Leave a Reply