[comment]: # ({03437da9-5508ac64})
# 4 Откривање SNMP OIDs

[comment]: # ({/03437da9-5508ac64})

[comment]: # ({b8212a1d-3680a9fa})
#### Преглед

У овом одељку ћемо извршити SNMP
[discovery](/manual/discovery/low_level_discovery) на прекидачу.

Овај метод откривања SNMP OIDs је подржан од Zabbix сервера/проксија 6.4.

[comment]: # ({/b8212a1d-3680a9fa})

[comment]: # ({3e67054c-bff9418f})
#### Прототипови ставки, окидача, графова

Прототипови ставки морају да се креирају као **зависни** прототипови ставки, користећи макрое из правила откривања.

Зависне ставке ће добити своје вредности из главне ставке `walk[]`. Због тога неће бити потребно да свака откривена ставка поставља упит SNMP уређај независно.

Прототипови окидача и графова се такође могу креирати коришћењем макроа из правила откривања.

[comment]: # ({/3e67054c-bff9418f})

[comment]: # ({new-indexes})
#### Dynamic indexes with walk[]

Dynamic indexes (for example, interface indexes) can shift when hardware is reconfigured.
To accommodate this behavior, a master SNMP walk discovery rule is created with a key such as:

```bash
walk[1.3.6.1.2.1.2.2.1.10]
```

After SNMP walk to JSON preprocessing, the result might resemble:

```json
[
    {
        "{#SNMPINDEX}": "2",
        "{#VALUE}": "123456"
    },
    {
        "{#SNMPINDEX}": "3",
        "{#VALUE}": "654321"
    }
]
```

A dependent item prototype uses the `{#SNMPINDEX}` macro to construct the key:

```default
net.if.in[{#SNMPINDEX}]
```

Preprocessing for this prototype includes "SNMP walk value" name with "1.3.6.1.2.1.2.2.1.10.{#SNMPINDEX}" OID in the *Parameter* field.
*Format*: "Unchanged".

At runtime, actual items such as `net.if.in[2]` and `net.if.in[3]` are created.
If a given interface index changes (for example, if the index `2` is replaced by `5` in the SNMP table), then on the next run of the discovery rule:

-   The old dependent item net.if.in[2] is marked as "lost" or removed, and no new data is gathered for that item.
-   A new dependent item net.if.in[5] is created, starting with an empty history.
-   Historical data from net.if.in[2] is not automatically moved to net.if.in[5].

Trigger prototype example:

```default
{Template_Interface:net.if.in[{#SNMPINDEX}].last()} > 1000000000
```

Graph prototype example includes items:

```default
net.if.in[{#SNMPINDEX}]
net.if.out[{#SNMPINDEX}]
```

This configuration ensures reliable monitoring of tables with dynamic indexes while minimizing SNMP traffic—only a single SNMP walk per poll cycle is required, with dependent item prototypes extracting the necessary values.

[comment]: # ({/new-indexes})

[comment]: # ({1815f72a-2be94533})
#### Откривени ентитети

Када се сервер покрене, креираће стварне зависне ставке, покретаче и графике засноване
на вредности које враћа правило откривања SNMP-а.

[comment]: # ({/1815f72a-2be94533})
