Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Zabbix Template – D-Link DGS-1210 (SNMP v2c)

## 📌 Overview

This Zabbix template provides monitoring for **D-Link DGS-1210 series switches**
(tested on **DGS-1210-08P**) using **SNMP v2c**.

The template is designed to be:
- **Stable**
- **Production-ready**
- **Fully compatible with Zabbix 7.4**
- Based only on **reliable SNMP data actually exposed by the device**

CPU, memory and temperature metrics are intentionally excluded, as they are not
consistently or reliably exposed by this switch model.

---

## ✅ Features

### General monitoring
- System uptime (`sysUpTime`)
- Device name (`sysName`)
- System description (`sysDescr`)
- Location (`sysLocation`)
- System Object ID (`sysObjectID`)

### Network interfaces (LLD)
Automatic interface discovery using **IF-MIB / IFX-MIB**:
- Operational status
- Administrative status
- Inbound / outbound traffic (bps)
- Input / output errors
- Automatic exclusion of internal / non-physical interfaces (CPU, VLAN, rif)

> ⚠️ The discovery **does not create new hosts**.
> It only creates items on the existing switch host.

---

## 🔧 Requirements

- **Zabbix Server / Proxy 7.4**
- SNMP **v2c enabled** on the switch
- SNMP community configured (e.g. `public`)
- Network connectivity between the switch and:
- Zabbix server **or**
- Assigned Zabbix proxy

---

## 📥 Template Import

1. Zabbix UI → **Data collection → Templates → Import**
2. Select the file:
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
zabbix_export:
version: '7.4'

template_groups:
- uuid: '9017d35422104e71a7ddd5fa32f74c80'
name: 'Templates/Network devices'

templates:
- uuid: 'cc253dec9d63440ab89ca0b08bf4c130'
template: 'Template Net D-Link DGS-1210 SNMP'
name: 'Template Net D-Link DGS-1210 SNMP'
description: >
D-Link DGS-1210-08P (SNMP v2c). Interfaces discovery, traffic, errors and link status.
UUIDs are UUIDv4 (hyphens removed), which Zabbix expects on import.
groups:
- name: 'Templates/Network devices'

macros:
- macro: '{$SNMP_COMMUNITY}'
type: TEXT
value: 'public'
description: 'SNMP v2c community (override per host)'

items:
- uuid: '7a5b16e886c94cec8d6c772b892f3628'
name: 'SNMP: sysUpTime'
type: SNMP_AGENT
snmp_oid: '1.3.6.1.2.1.1.3.0'
key: 'snmp.sysUpTime'
delay: 1m
value_type: FLOAT
units: uptime
history: 7d
trends: 365d

- uuid: '521c97ee3d284a22b6e9a8dc587aac29'
name: 'SNMP: sysName'
type: SNMP_AGENT
snmp_oid: '1.3.6.1.2.1.1.5.0'
key: 'snmp.sysName'
delay: 5m
value_type: TEXT
history: 30d
trends: 0

- uuid: '03cfc9d73ef6403a8e98edf5f2f23559'
name: 'SNMP: sysDescr'
type: SNMP_AGENT
snmp_oid: '1.3.6.1.2.1.1.1.0'
key: 'snmp.sysDescr'
delay: 1h
value_type: TEXT
history: 30d
trends: 0

- uuid: 'dd7623219e0c4fda893b3517859cb0f6'
name: 'SNMP: sysLocation'
type: SNMP_AGENT
snmp_oid: '1.3.6.1.2.1.1.6.0'
key: 'snmp.sysLocation'
delay: 1h
value_type: TEXT
history: 30d
trends: 0

- uuid: '47a6724ff85840e5a669f6e8436641e1'
name: 'SNMP: sysObjectID'
type: SNMP_AGENT
snmp_oid: '1.3.6.1.2.1.1.2.0'
key: 'snmp.sysObjectID'
delay: 1h
value_type: TEXT
history: 30d
trends: 0

discovery_rules:
- uuid: '174df32f43db477aaf1e6e09ede6647b'
name: 'Network interfaces discovery'
type: SNMP_AGENT
key: 'net.if.discovery'
delay: 10m
snmp_oid: >
discovery[{#IFINDEX},1.3.6.1.2.1.2.2.1.1,
{#IFDESCR},1.3.6.1.2.1.2.2.1.2,
{#IFTYPE},1.3.6.1.2.1.2.2.1.3,
{#IFNAME},1.3.6.1.2.1.31.1.1.1.1]

filter:
evaltype: AND
conditions:
- formulaid: A
macro: '{#IFDESCR}'
value: '.*(L2VLAN|rif|CPU).*'
operator: NOT_MATCHES_REGEX

item_prototypes:
- uuid: '87b99544a55d49db9c6fefe256556cb2'
name: 'Interface {#IFNAME}: Operational status'
type: SNMP_AGENT
snmp_oid: '1.3.6.1.2.1.2.2.1.8.{#IFINDEX}'
key: 'if.oper.status[{#IFINDEX}]'
delay: 1m
value_type: UNSIGNED
history: 30d
trends: 365d

- uuid: '3de2f5afb27245babd4e6a39b2478516'
name: 'Interface {#IFNAME}: Admin status'
type: SNMP_AGENT
snmp_oid: '1.3.6.1.2.1.2.2.1.7.{#IFINDEX}'
key: 'if.admin.status[{#IFINDEX}]'
delay: 5m
value_type: UNSIGNED
history: 30d
trends: 365d

- uuid: '15d189a1b62f4b8c9fd174c830ef53cc'
name: 'Interface {#IFNAME}: Inbound traffic'
type: SNMP_AGENT
snmp_oid: '1.3.6.1.2.1.31.1.1.1.6.{#IFINDEX}'
key: 'if.in.bps[{#IFINDEX}]'
delay: 1m
value_type: FLOAT
units: bps
history: 30d
trends: 365d
preprocessing:
- type: CHANGE_PER_SECOND
- type: MULTIPLIER
parameters: ['8']

- uuid: '949d5e24877b4f979284d2ee1de22cde'
name: 'Interface {#IFNAME}: Outbound traffic'
type: SNMP_AGENT
snmp_oid: '1.3.6.1.2.1.31.1.1.1.10.{#IFINDEX}'
key: 'if.out.bps[{#IFINDEX}]'
delay: 1m
value_type: FLOAT
units: bps
history: 30d
trends: 365d
preprocessing:
- type: CHANGE_PER_SECOND
- type: MULTIPLIER
parameters: ['8']

- uuid: 'f32806ec1a834a548684bdf07e87941b'
name: 'Interface {#IFNAME}: In errors'
type: SNMP_AGENT
snmp_oid: '1.3.6.1.2.1.2.2.1.14.{#IFINDEX}'
key: 'if.in.errors[{#IFINDEX}]'
delay: 2m
value_type: UNSIGNED
history: 30d
trends: 365d
preprocessing:
- type: CHANGE_PER_SECOND

- uuid: '3e6eaa1f3aa04b2098c1fce79311cf93'
name: 'Interface {#IFNAME}: Out errors'
type: SNMP_AGENT
snmp_oid: '1.3.6.1.2.1.2.2.1.20.{#IFINDEX}'
key: 'if.out.errors[{#IFINDEX}]'
delay: 2m
value_type: UNSIGNED
history: 30d
trends: 365d
preprocessing:
- type: CHANGE_PER_SECOND

trigger_prototypes:
- uuid: '7823dce1295848f38ec3d7569a38c99d'
name: 'Interface {#IFNAME}: Link down'
expression: 'last(/Template Net D-Link DGS-1210 SNMP/if.admin.status[{#IFINDEX}])=1 and last(/Template Net D-Link DGS-1210 SNMP/if.oper.status[{#IFINDEX}])<>1'
priority: HIGH
manual_close: 'YES'
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Template Zabbix – D-Link DGS-1510 (SNMP v2c)

## 📌 Description

Ce template Zabbix permet le monitoring des switches **D-Link DGS-1510**
(testé sur **DGS-1510-52XMP – Build 1.81.004**) via **SNMP v2c**.

Il est volontairement **simple, stable et orienté production** :
- pas de CPU / RAM (non exposés de manière fiable sur ce modèle)
- uniquement des métriques réellement exploitables

---

## ✅ Fonctionnalités couvertes

### Supervision générale
- Uptime du switch (sysUpTime)
- Nom du switch (sysName)
- Description système (sysDescr)

### Interfaces réseau (LLD)
Découverte automatique des interfaces via IF-MIB / IFX-MIB :
- État opérationnel des ports
- Trafic entrant / sortant (bps)
- Filtrage des interfaces internes (CPU, VLAN, rif)

> ⚠️ Aucun nouvel hôte n’est créé :
> la découverte ajoute uniquement des **items sur le switch existant**.

---

## 🔧 Prérequis

- Zabbix **6.4 ou supérieur**
- SNMP **v2c activé** sur le switch
- Communauté SNMP configurée (ex. `public`)
- Le switch doit être joignable depuis :
- le serveur Zabbix **ou**
- le proxy Zabbix assigné à l’hôte

---

## 📥 Import du template

1. Zabbix → **Collecte de données → Modèles → Importer**
2. Sélectionner le fichier :
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
zabbix_export:
version: '7.4'

template_groups:
- uuid: 8f1c7b6e2c9e4b5e9a411b5d9c3a8e12
name: 'Templates/Network devices'

templates:
- uuid: 2a9c4f6e8b3f4e6abc717e2c5d4f9a10
template: 'Template Net D-Link DGS-1510 SNMP'
name: 'Template Net D-Link DGS-1510 SNMP'
description: >
D-Link DGS-1510 series (tested on DGS-1510-52XMP Build 1.81.004).
SNMPv2c monitoring: availability, identification, interface discovery,
traffic and errors. CPU/RAM intentionally excluded.

groups:
- name: 'Templates/Network devices'

macros:
- macro: '{$SNMP_COMMUNITY}'
type: TEXT
value: 'public'
description: 'SNMP v2c community'

items:
- uuid: 3c9b1f746a2d4f1c8b719f5a2d4e8c01
name: 'SNMP: sysUpTime'
type: SNMP_AGENT
snmp_oid: '1.3.6.1.2.1.1.3.0'
key: 'snmp.sysUpTime'
delay: 1m
value_type: FLOAT
units: uptime
history: 7d
trends: 365d

- uuid: 4d7a2c1e9b844a2f8e5c3f6b1d9a2e11
name: 'SNMP: sysName'
type: SNMP_AGENT
snmp_oid: '1.3.6.1.2.1.1.5.0'
key: 'snmp.sysName'
delay: 5m
value_type: TEXT
history: 30d
trends: 0

- uuid: 5e8b4a2d7c6f4f919a3e1d2b6c5f7e21
name: 'SNMP: sysDescr'
type: SNMP_AGENT
snmp_oid: '1.3.6.1.2.1.1.1.0'
key: 'snmp.sysDescr'
delay: 1h
value_type: TEXT
history: 30d
trends: 0

discovery_rules:
- uuid: 6f1a9c3d2e4b4c7f8a1e5d9b3f2c6a31
name: 'Network interfaces discovery'
type: SNMP_AGENT
key: 'net.if.discovery'
delay: 10m
snmp_oid: >
discovery[{#IFINDEX},1.3.6.1.2.1.2.2.1.1,
{#IFDESCR},1.3.6.1.2.1.2.2.1.2,
{#IFNAME},1.3.6.1.2.1.31.1.1.1.1]

filter:
evaltype: AND
conditions:
- formulaid: A
macro: '{#IFDESCR}'
value: '.*(L2VLAN|rif|CPU).*'
operator: NOT_MATCHES_REGEX

item_prototypes:
- uuid: 7a2c5d4e1f9b4e8c9a3d6b2f1c5e9d41
name: 'Interface {#IFNAME}: Operational status'
type: SNMP_AGENT
snmp_oid: '1.3.6.1.2.1.2.2.1.8.{#IFINDEX}'
key: 'if.oper.status[{#IFINDEX}]'
delay: 1m
value_type: UNSIGNED
history: 30d
trends: 365d

- uuid: 8b3f6a5d9c2e4f718d1a5e3c9b2f6a51
name: 'Interface {#IFNAME}: Inbound traffic'
type: SNMP_AGENT
snmp_oid: '1.3.6.1.2.1.31.1.1.1.6.{#IFINDEX}'
key: 'if.in.bps[{#IFINDEX}]'
delay: 1m
value_type: FLOAT
units: bps
history: 30d
trends: 365d
preprocessing:
- type: CHANGE_PER_SECOND
- type: MULTIPLIER
parameters: ['8']

- uuid: 9c5e1d7a4b2f4a6e8c3f2d9b5a6e1c61
name: 'Interface {#IFNAME}: Outbound traffic'
type: SNMP_AGENT
snmp_oid: '1.3.6.1.2.1.31.1.1.1.10.{#IFINDEX}'
key: 'if.out.bps[{#IFINDEX}]'
delay: 1m
value_type: FLOAT
units: bps
history: 30d
trends: 365d
preprocessing:
- type: CHANGE_PER_SECOND
- type: MULTIPLIER
parameters: ['8']
Loading
Loading