Sprachauswahl:
Skip to main navigation Skip to main content Skip to page footer

Didactum Monitoring und Icinga 2 Integration

Vollständige Schritt-für-Schritt-Anleitung zur Einbindung von Didactum Monitoring-Geräten und Sensoren in Icinga 2 via SNMP – inklusive Host-Konfiguration, CheckCommand-Definitionen, Services für alle Sensortypen, SNMP Traps und E-Mail-Benachrichtigung.

  • Software: Icinga 2 (ab Version 2.11) + Icinga Web 2
  • OS: Ubuntu 20.04 / 22.04 LTS oder Debian 11/12
  • Protokoll: SNMP v1 / v2c / v3 via check_snmp Plugin
  • Geräte: Didactum Monitoring System 100T / 300T / 500T / 550T
  • Sensoren: Temperatur, Leckage, Luftfeuchtigkeit, Türkontakt, Rauch

1. Voraussetzungen und Systemüberblick

Icinga-Server

  • Icinga 2 und Icinga Web 2 installiert und funktionsfähig
  • Paket monitoring-plugins oder nagios-plugins installiert
  • UDP-Port 161 ausgehend für SNMP-Polling geöffnet
  • UDP-Port 162 eingehend für SNMP-Traps geöffnet
  • Netzwerkzugang zum Didactum-Gerät

Didactum-Gerät

  • Monitoring System 100T / 300T / 500T oder 550T
  • SNMP aktiviert (v2c oder v3)
  • MIB-Datei im Web-Interface verfügbar zum Download
  • Netzwerkzugang zum Icinga-Server

Architektur

[Icinga 2 Server]                 [Didactum Monitoring System]
  IP: 192.168.1.10                  IP: 192.168.1.50
  Icinga Web 2: Port 80/443
                        --SNMP Polling UDP 161-->
                        <--SNMP Traps UDP 162---

Wichtige Icinga 2 Verzeichnisse

/etc/icinga2/                  <-- Hauptkonfiguration
/etc/icinga2/conf.d/           <-- Hosts, Services, Commands
/etc/icinga2/conf.d/hosts/     <-- Host-Definitionen
/usr/lib/nagios/plugins/       <-- check_snmp Plugin
/usr/share/snmp/mibs/          <-- MIB-Dateien

2. SNMP auf dem Didactum-Gerät aktivieren

Schritt 1 – Web-Interface öffnen

Im Browser aufrufen: 192.168.1.50 (IP des Didactum-Geräts anpassen)

Schritt 2 – SNMP-Einstellungen aufrufen

Systemeinstellungen → SNMP

Schritt 3 – Folgende Werte eintragen

Feld im Didactum Web-InterfaceWert
SNMP aktivierenAktiviert
SNMP-Versionv2c (empfohlen) oder v3 für Produktionsumgebungen
Community String (v1/v2c)didactum_icinga (nicht „public" verwenden!)
SNMP-Port161
Trap-Empfänger IP192.168.1.10 (IP des Icinga-Servers)
Trap-Port162
Trap-Versionv2c

SNMPv3-Einstellungen (optional, erhöhte Sicherheit)

FeldWert / Beispiel
Security Nameicinga_user
Auth-ProtokollSHA
Auth-Passwortmind. 8 Zeichen
Priv-ProtokollAES
Priv-Passwortmind. 8 Zeichen
Security LevelauthPriv

3. Benötigte Pakete auf dem Icinga-Server installieren

# SNMP-Tools und Monitoring-Plugins installieren
sudo apt update
sudo apt install -y snmp snmp-mibs-downloader \
    monitoring-plugins nagios-plugins-contrib \
    snmptrapd snmptt

# check_snmp testen
/usr/lib/nagios/plugins/check_snmp --help

Anschließend SNMP-Konfiguration anpassen, damit alle MIBs geladen werden:

sudo nano /etc/snmp/snmp.conf

Folgende Zeile eintragen (oder auskommentieren entfernen):

mibs ALL
mibdirs /usr/share/snmp/mibs

4. MIB-Datei installieren

Schritt 1 – MIB-Datei aus dem Didactum Web-Interface laden

Systemeinstellungen → SNMP → "MIB-Datei herunterladen" → didactum.mib

Schritt 2 – MIB auf dem Icinga-Server installieren

# MIB-Datei in Standard-Verzeichnis kopieren
sudo cp didactum.mib /usr/share/snmp/mibs/

# SNMP-Konfiguration aktualisieren
echo "mibdirs /usr/share/snmp/mibs" | sudo tee -a /etc/snmp/snmp.conf
echo "mibs ALL" | sudo tee -a /etc/snmp/snmp.conf

# Test: MIB-Walk mit Klartext-Namen
snmpwalk -v 2c -c didactum_icinga -m ALL 192.168.1.50 \
    .1.3.6.1.4.1.46501.5.1.1

Schritt 3 – Einzelnen Sensor-Wert testen

# Temperaturwert abfragen (Rohwert ÷ 10 = Grad Celsius)
snmpget -v 2c -c didactum_icinga 192.168.1.50 \
    .1.3.6.1.4.1.46501.5.1.1.7.101001

# Leckage-Status abfragen (0=trocken, 1=Wasser)
snmpget -v 2c -c didactum_icinga 192.168.1.50 \
    .1.3.6.1.4.1.46501.5.1.1.7.107001

5. Didactum-Host in Icinga 2 anlegen

Schritt 1 – Host-Konfigurationsdatei erstellen

sudo mkdir -p /etc/icinga2/conf.d/didactum
sudo nano /etc/icinga2/conf.d/didactum/hosts.conf

Schritt 2 – Folgenden Inhalt eintragen

// ============================================================
// Didactum Monitoring System – Host-Konfiguration
// Datei: /etc/icinga2/conf.d/didactum/hosts.conf
// ============================================================

object Host "didactum-monitor-01" {
    display_name    = "Didactum Monitoring System 01"
    address         = "192.168.1.50"
    check_command   = "hostalive"

    // SNMP-Zugangsdaten als Custom Variables
    vars.snmp_community = "didactum_icinga"
    vars.snmp_version   = "2"

    // Sensor-IDs (aus Didactum Web-Interface ermitteln)
    vars.didactum_temp_oid      = ".1.3.6.1.4.1.46501.5.1.1.7.101001"
    vars.didactum_temp_stat_oid = ".1.3.6.1.4.1.46501.5.1.1.6.101001"
    vars.didactum_leak_oid      = ".1.3.6.1.4.1.46501.5.1.1.7.107001"
    vars.didactum_hum_oid       = ".1.3.6.1.4.1.46501.5.1.1.7.102001"
    vars.didactum_door_oid      = ".1.3.6.1.4.1.46501.5.1.1.7.104001"
    vars.didactum_smoke_oid     = ".1.3.6.1.4.1.46501.5.1.1.7.106001"

    // Temperaturschwellwerte (Rohwert × 10!)
    vars.didactum_temp_warn     = "280"   // = 28,0 °C
    vars.didactum_temp_crit     = "350"   // = 35,0 °C

    // Hostgruppe
    groups = [ "didactum-monitoring" ]

    // Benachrichtigung aktivieren
    vars.notification["mail"] = {
        groups = [ "icingaadmins" ]
    }
}

// ============================================================
// Zweites Gerät (auskommentiert – bei Bedarf aktivieren)
// ============================================================
// object Host "didactum-monitor-02" {
//     display_name  = "Didactum Monitoring System 02"
//     address       = "192.168.1.51"
//     check_command = "hostalive"
//     import "didactum-monitor-01"   // Einstellungen übernehmen
// }

Schritt 3 – Hostgruppe definieren

sudo nano /etc/icinga2/conf.d/didactum/groups.conf
object HostGroup "didactum-monitoring" {
    display_name = "Didactum Monitoring Geräte"
}

object ServiceGroup "didactum-sensoren" {
    display_name = "Didactum Sensor-Services"
}

6. CheckCommand-Definitionen für Didactum

Schritt 1 – commands.conf erstellen

sudo nano /etc/icinga2/conf.d/didactum/commands.conf

Schritt 2 – Folgenden Inhalt eintragen

// ============================================================
// Didactum CheckCommands
// Datei: /etc/icinga2/conf.d/didactum/commands.conf
// ============================================================

// ------------------------------------------------------------
// Basierend auf dem integrierten check_snmp ITL-Command
// Temperaturwert mit Warning/Critical-Schwellwerten
// Wichtig: Rohwert × 10 = Eingabewert (25,0 °C = 250)
// ------------------------------------------------------------
object CheckCommand "didactum-temperature" {
    import "plugin-check-command"

    command = [ PluginDir + "/check_snmp" ]

    arguments = {
        "-H" = "$address$"
        "-C" = "$snmp_community$"
        "-P" = "$snmp_version$"
        "-o" = "$didactum_temp_oid$"
        "-w" = "$didactum_temp_warn$"
        "-c" = "$didactum_temp_crit$"
        "-l" = "Temperatur"
        "-u" = "0.1°C"
        "--timeout" = "10"
    }

    vars.snmp_community     = "$host.vars.snmp_community$"
    vars.snmp_version       = "$host.vars.snmp_version$"
    vars.didactum_temp_oid  = "$host.vars.didactum_temp_oid$"
    vars.didactum_temp_warn = "$host.vars.didactum_temp_warn$"
    vars.didactum_temp_crit = "$host.vars.didactum_temp_crit$"
}

// ------------------------------------------------------------
// Temperatursensor-Status (0=OK, 1=Alarm, 2=Kein Signal)
// ------------------------------------------------------------
object CheckCommand "didactum-temp-status" {
    import "plugin-check-command"

    command = [ PluginDir + "/check_snmp" ]

    arguments = {
        "-H" = "$address$"
        "-C" = "$snmp_community$"
        "-P" = "$snmp_version$"
        "-o" = "$didactum_temp_stat_oid$"
        "-w" = "0:0"
        "-c" = "1:2"
        "-l" = "Temp-Status"
        "--timeout" = "10"
    }

    vars.snmp_community         = "$host.vars.snmp_community$"
    vars.snmp_version           = "$host.vars.snmp_version$"
    vars.didactum_temp_stat_oid = "$host.vars.didactum_temp_stat_oid$"
}

// ------------------------------------------------------------
// Leckagesensor (0=trocken=OK, 1=Wasser=CRITICAL)
// ------------------------------------------------------------
object CheckCommand "didactum-leakage" {
    import "plugin-check-command"

    command = [ PluginDir + "/check_snmp" ]

    arguments = {
        "-H" = "$address$"
        "-C" = "$snmp_community$"
        "-P" = "$snmp_version$"
        "-o" = "$didactum_leak_oid$"
        "-w" = "0:0"
        "-c" = "1:1"
        "-l" = "Leckage"
        "--timeout" = "10"
    }

    vars.snmp_community    = "$host.vars.snmp_community$"
    vars.snmp_version      = "$host.vars.snmp_version$"
    vars.didactum_leak_oid = "$host.vars.didactum_leak_oid$"
}

// ------------------------------------------------------------
// Luftfeuchtigkeit mit Schwellwerten in %
// ------------------------------------------------------------
object CheckCommand "didactum-humidity" {
    import "plugin-check-command"

    command = [ PluginDir + "/check_snmp" ]

    arguments = {
        "-H" = "$address$"
        "-C" = "$snmp_community$"
        "-P" = "$snmp_version$"
        "-o" = "$didactum_hum_oid$"
        "-w" = "$didactum_hum_warn$"
        "-c" = "$didactum_hum_crit$"
        "-l" = "Luftfeuchtigkeit"
        "-u" = "%"
        "--timeout" = "10"
    }

    vars.snmp_community   = "$host.vars.snmp_community$"
    vars.snmp_version     = "$host.vars.snmp_version$"
    vars.didactum_hum_oid = "$host.vars.didactum_hum_oid$"
    vars.didactum_hum_warn = "75"
    vars.didactum_hum_crit = "85"
}

// ------------------------------------------------------------
// Türkontakt (0=geschlossen=OK, 1=offen=WARNING)
// ------------------------------------------------------------
object CheckCommand "didactum-door" {
    import "plugin-check-command"

    command = [ PluginDir + "/check_snmp" ]

    arguments = {
        "-H" = "$address$"
        "-C" = "$snmp_community$"
        "-P" = "$snmp_version$"
        "-o" = "$didactum_door_oid$"
        "-w" = "1:1"
        "-c" = ""
        "-l" = "Tuerkonakt"
        "--timeout" = "10"
    }

    vars.snmp_community    = "$host.vars.snmp_community$"
    vars.snmp_version      = "$host.vars.snmp_version$"
    vars.didactum_door_oid = "$host.vars.didactum_door_oid$"
}

// ------------------------------------------------------------
// Rauchmelder (0=kein Rauch=OK, 1=Alarm=CRITICAL)
// ------------------------------------------------------------
object CheckCommand "didactum-smoke" {
    import "plugin-check-command"

    command = [ PluginDir + "/check_snmp" ]

    arguments = {
        "-H" = "$address$"
        "-C" = "$snmp_community$"
        "-P" = "$snmp_version$"
        "-o" = "$didactum_smoke_oid$"
        "-w" = "0:0"
        "-c" = "1:1"
        "-l" = "Rauchmelder"
        "--timeout" = "10"
    }

    vars.snmp_community     = "$host.vars.snmp_community$"
    vars.snmp_version       = "$host.vars.snmp_version$"
    vars.didactum_smoke_oid = "$host.vars.didactum_smoke_oid$"
}

7. Services für alle Sensortypen konfigurieren

Schritt 1 – services.conf erstellen

sudo nano /etc/icinga2/conf.d/didactum/services.conf

Schritt 2 – Folgenden Inhalt eintragen

// ============================================================
// Didactum Services
// Datei: /etc/icinga2/conf.d/didactum/services.conf
// ============================================================

// ------------------------------------------------------------
// Temperatursensor – Messwert
// ------------------------------------------------------------
object Service "Didactum Temperatur" {
    host_name     = "didactum-monitor-01"
    display_name  = "Temperatur Sensor 01"
    check_command = "didactum-temperature"
    check_interval = 5m
    retry_interval = 1m
    max_check_attempts = 3

    groups = [ "didactum-sensoren" ]

    vars.notification["mail"] = {
        groups = [ "icingaadmins" ]
    }
}

// ------------------------------------------------------------
// Temperatursensor – Status
// ------------------------------------------------------------
object Service "Didactum Temperatur Status" {
    host_name     = "didactum-monitor-01"
    display_name  = "Temperatur Sensor 01 – Status"
    check_command = "didactum-temp-status"
    check_interval = 5m
    retry_interval = 1m
    max_check_attempts = 3

    groups = [ "didactum-sensoren" ]
}

// ------------------------------------------------------------
// Leckagesensor
// ------------------------------------------------------------
object Service "Didactum Leckage" {
    host_name     = "didactum-monitor-01"
    display_name  = "Wassersensor / Leckage 01"
    check_command = "didactum-leakage"
    check_interval = 2m
    retry_interval = 30s
    max_check_attempts = 2

    // Sofort kritisch, keine Verzögerung
    enable_flapping = false

    groups = [ "didactum-sensoren" ]

    vars.notification["mail"] = {
        groups = [ "icingaadmins" ]
    }
}

// ------------------------------------------------------------
// Luftfeuchtigkeit
// ------------------------------------------------------------
object Service "Didactum Luftfeuchtigkeit" {
    host_name     = "didactum-monitor-01"
    display_name  = "Luftfeuchtigkeit Sensor 01"
    check_command = "didactum-humidity"
    check_interval = 5m
    retry_interval = 1m
    max_check_attempts = 3

    groups = [ "didactum-sensoren" ]
}

// ------------------------------------------------------------
// Türkontakt
// ------------------------------------------------------------
object Service "Didactum Tuerkonakt" {
    host_name     = "didactum-monitor-01"
    display_name  = "Türkontakt 01"
    check_command = "didactum-door"
    check_interval = 1m
    retry_interval = 30s
    max_check_attempts = 1

    groups = [ "didactum-sensoren" ]
}

// ------------------------------------------------------------
// Rauchmelder
// ------------------------------------------------------------
object Service "Didactum Rauchmelder" {
    host_name     = "didactum-monitor-01"
    display_name  = "Rauchmelder 01"
    check_command = "didactum-smoke"
    check_interval = 1m
    retry_interval = 30s
    max_check_attempts = 1

    enable_flapping = false

    groups = [ "didactum-sensoren" ]

    vars.notification["mail"] = {
        groups = [ "icingaadmins" ]
    }
}

8. Dynamische Service-Zuweisung mit Apply-Rules

Wer mehrere Didactum-Geräte betreibt, kann Services per Apply-Rule automatisch allen Geräten einer Hostgruppe zuweisen, ohne für jedes Gerät einzelne Service-Objekte anzulegen.

sudo nano /etc/icinga2/conf.d/didactum/apply-rules.conf
// ============================================================
// Didactum Apply-Rules – automatische Service-Zuweisung
// für alle Hosts in der Gruppe "didactum-monitoring"
// ============================================================

apply Service "Didactum Temperatur" {
    import "generic-service"
    check_command  = "didactum-temperature"
    check_interval = 5m
    retry_interval = 1m

    assign where "didactum-monitoring" in host.groups
    ignore where host.vars.didactum_temp_oid == ""
}

apply Service "Didactum Leckage" {
    import "generic-service"
    check_command  = "didactum-leakage"
    check_interval = 2m
    retry_interval = 30s

    assign where "didactum-monitoring" in host.groups
    ignore where host.vars.didactum_leak_oid == ""
}

apply Service "Didactum Luftfeuchtigkeit" {
    import "generic-service"
    check_command  = "didactum-humidity"
    check_interval = 5m

    assign where "didactum-monitoring" in host.groups
    ignore where host.vars.didactum_hum_oid == ""
}

apply Service "Didactum Tuerkonakt" {
    import "generic-service"
    check_command  = "didactum-door"
    check_interval = 1m

    assign where "didactum-monitoring" in host.groups
    ignore where host.vars.didactum_door_oid == ""
}

apply Service "Didactum Rauchmelder" {
    import "generic-service"
    check_command  = "didactum-smoke"
    check_interval = 1m

    assign where "didactum-monitoring" in host.groups
    ignore where host.vars.didactum_smoke_oid == ""
}

Konfiguration validieren und Icinga 2 neu laden

# Konfiguration auf Fehler prüfen
sudo icinga2 daemon -C

# Icinga 2 neu laden (kein Neustart erforderlich)
sudo systemctl reload icinga2

# Bei Fehler: vollständigen Neustart
sudo systemctl restart icinga2

9. SNMP Traps empfangen (SNMPTT)

Icinga 2 empfängt keine SNMP-Traps direkt. Der Umweg führt über snmptrapd → snmptt → Icinga 2 Passive Check Result.

Schritt 1 – snmptrapd konfigurieren

sudo nano /etc/snmp/snmptrapd.conf
# Community String für Trap-Empfang
authCommunity execute,log,net didactum_icinga

# Alle Traps an snmptt weiterleiten
traphandle default /usr/sbin/snmptthandler

Schritt 2 – SNMPTT konfigurieren

sudo nano /etc/snmp/snmptt.ini

Folgenden Abschnitt suchen und anpassen:

mode = daemon
net_snmp_perl_enable = 1
mibs_environment = ALL
log_enable = 1
log_file = /var/log/snmptt/snmptt.log
unknown_trap_log_enable = 1

Schritt 3 – SNMPTT Event-Datei für Didactum anlegen

sudo nano /etc/snmp/snmptt.conf
# ============================================================
# Didactum SNMP Trap Definitionen
# ============================================================

# Allgemeiner Didactum-Alarm (Enterprise Trap)
EVENT didactumAlarm .1.3.6.1.4.1.46501.* "Status Events" Normal
FORMAT Didactum Alarm: $*
EXEC curl -s -k -u root:icinga \
    -H 'Accept: application/json' \
    -X POST 'https://localhost:5665/v1/actions/process-check-result' \
    -d '{"type":"Service","filter":"host.name==\"didactum-monitor-01\" && service.name==\"Didactum SNMP Trap\"","exit_status":2,"plugin_output":"CRITICAL: Didactum Alarm empfangen - $*"}'
SDESC
Allgemeiner Alarm vom Didactum Monitoring System.
EDESC

# Temperatualarm
EVENT didactumTempAlarm .1.3.6.1.4.1.46501.5.1.1.6.101001 "Status Events" Normal
FORMAT Didactum Temperatur-Alarm: $*
EXEC curl -s -k -u root:icinga \
    -H 'Accept: application/json' \
    -X POST 'https://localhost:5665/v1/actions/process-check-result' \
    -d '{"type":"Service","filter":"host.name==\"didactum-monitor-01\" && service.name==\"Didactum Temperatur Status\"","exit_status":2,"plugin_output":"CRITICAL: Temperatur-Alarm"}'
SDESC
Temperatur-Alarmmeldung vom Didactum Gerät.
EDESC

# Leckagealarm
EVENT didactumLeakAlarm .1.3.6.1.4.1.46501.5.1.1.7.107001 "Status Events" Normal
FORMAT Didactum Leckage-Alarm: $*
EXEC curl -s -k -u root:icinga \
    -H 'Accept: application/json' \
    -X POST 'https://localhost:5665/v1/actions/process-check-result' \
    -d '{"type":"Service","filter":"host.name==\"didactum-monitor-01\" && service.name==\"Didactum Leckage\"","exit_status":2,"plugin_output":"CRITICAL: Wasser erkannt!"}'
SDESC
Leckagealarm – Wasser erkannt.
EDESC

Schritt 4 – Icinga 2 API für Passive Checks aktivieren

# API-Feature aktivieren (falls noch nicht aktiv)
sudo icinga2 feature enable api
sudo icinga2 api setup

# API-Benutzer prüfen
sudo cat /etc/icinga2/conf.d/api-users.conf

Schritt 5 – Passive-Check-Service für Trap-Empfang anlegen

sudo nano /etc/icinga2/conf.d/didactum/trap-service.conf
// Passiver Service für SNMP-Trap-Empfang
object Service "Didactum SNMP Trap" {
    host_name     = "didactum-monitor-01"
    display_name  = "Didactum SNMP Trap Empfänger"
    check_command = "dummy"

    enable_active_checks  = false
    enable_passive_checks = true
    enable_notifications  = true

    // Wenn kein Trap für 10 Minuten: UNKNOWN
    check_interval = 10m
    max_check_attempts = 1

    groups = [ "didactum-sensoren" ]
}

Schritt 6 – Dienste starten

sudo systemctl enable snmptrapd snmptt
sudo systemctl start snmptrapd snmptt
sudo systemctl reload icinga2

10. SNMP OID-Referenz

Alle Didactum-OIDs beginnen mit .1.3.6.1.4.1.46501 (ältere Firmware) bzw. .1.3.6.1.4.1.39052 (neuere Modelle). Die Sensor-ID wird am Ende angehängt.

OID-Felder je Sensor

FeldBedeutungBeispiel
.1.x.SENSOR_IDSensor-ID.1.3.6.1.4.1.46501.5.1.1.1.101001
.5.x.SENSOR_IDSensor-Name.1.3.6.1.4.1.46501.5.1.1.5.101001
.6.x.SENSOR_IDStatus (0=OK, 1=Alarm, 2=Kein Signal).1.3.6.1.4.1.46501.5.1.1.6.101001
.7.x.SENSOR_IDMesswert (aktuell).1.3.6.1.4.1.46501.5.1.1.7.101001

Sensortypen mit OIDs

SensortypSensor-IDOID MesswertOID StatusEinheit / Hinweis
Temperatursensor (digital)101001.1.3.6.1.4.1.46501.5.1.1.7.101001.1.3.6.1.4.1.46501.5.1.1.6.101001Rohwert ÷ 10 = °C, Schwellwert × 10 eingeben
Temperatursensor (analog)201001.1.3.6.1.4.1.39052.5.2.1.7.201001.1.3.6.1.4.1.39052.5.2.1.6.201001Rohwert ÷ 10 = °C
Wassersensor / Leckage107001.1.3.6.1.4.1.46501.5.1.1.7.107001.1.3.6.1.4.1.46501.5.1.1.6.1070010 = trocken, 1 = Wasser erkannt
Luftfeuchtigkeit102001.1.3.6.1.4.1.46501.5.1.1.7.102001.1.3.6.1.4.1.46501.5.1.1.6.102001Wert in % (65 = 65 %)
Potentialfreier Kontakt101003.1.3.6.1.4.1.39052.5.1.1.7.101003.1.3.6.1.4.1.39052.5.1.1.6.1010030 = offen, 1 = geschlossen
Türkontakt104001.1.3.6.1.4.1.46501.5.1.1.7.104001.1.3.6.1.4.1.46501.5.1.1.6.1040010 = geschlossen, 1 = geöffnet
Rauchmelder106001.1.3.6.1.4.1.46501.5.1.1.7.106001.1.3.6.1.4.1.46501.5.1.1.6.1060010 = kein Rauch, 1 = Alarm

Sensor-ID herausfinden: 

Im Didactum Web-Interface unter Systembaum → Sensor auswählen → Details. Diese ID wird ans Ende der OID angehängt.

Temperaturschwellwerte in check_snmp: 

Da check_snmp mit dem Rohwert arbeitet, müssen Schwellwerte immer × 10 eingegeben werden. 28 °C entspricht dem Eingabewert 280.

MIB-Prefix je Modell: 

Ältere Geräte verwenden .1.3.6.1.4.1.46501, neuere Modelle eventuell .1.3.6.1.4.1.39052. Die genauen OIDs entnehmen Sie der MIB-Datei Ihres Geräts.

check_snmp direkt testen (Kommandozeile)

# Temperaturwert (SNMPv2c)
/usr/lib/nagios/plugins/check_snmp \
    -H 192.168.1.50 -C didactum_icinga -P 2 \
    -o .1.3.6.1.4.1.46501.5.1.1.7.101001 \
    -w 280 -c 350 -l "Temperatur" -u "0.1Grad"

# Leckage-Status
/usr/lib/nagios/plugins/check_snmp \
    -H 192.168.1.50 -C didactum_icinga -P 2 \
    -o .1.3.6.1.4.1.46501.5.1.1.7.107001 \
    -w 0:0 -c 1:1 -l "Leckage"

# SNMPv3 Beispiel
/usr/lib/nagios/plugins/check_snmp \
    -H 192.168.1.50 -P 3 \
    -L authPriv -U icinga_user \
    -a SHA -A "AuthPasswort" \
    -x AES -X "PrivPasswort" \
    -o .1.3.6.1.4.1.46501.5.1.1.7.101001 \
    -w 280 -c 350

11. E-Mail-Benachrichtigung konfigurieren

Schritt 1 – Notification-Feature aktivieren

sudo icinga2 feature enable notification
sudo systemctl reload icinga2

Schritt 2 – Benutzer anlegen oder anpassen

sudo nano /etc/icinga2/conf.d/users.conf
object User "admin" {
    import "generic-user"
    display_name  = "Administrator"
    email         = "admin@ihredomain.de"
    groups        = [ "icingaadmins" ]

    // Alarmtypen definieren
    types   = [ Problem, Recovery, Acknowledgement ]
    states  = [ Critical, Warning, Unknown ]
}

object UserGroup "icingaadmins" {
    display_name = "Icinga 2 Administratoren"
}

Schritt 3 – E-Mail-Skript prüfen

# Icinga 2 liefert fertige Notification-Skripte mit:
ls /etc/icinga2/scripts/
# mail-host-notification.sh
# mail-service-notification.sh

Auf dem Server muss ein lokaler Mailversand (z.B. Postfix) eingerichtet sein:

sudo apt install postfix mailutils -y
# Konfigurationstyp: "Internet Site" oder "Satellite system" wählen
echo "Testmail Icinga" | mail -s "Test" admin@ihredomain.de

Schritt 4 – Notification-Objekte für Didactum-Services anlegen

sudo nano /etc/icinga2/conf.d/didactum/notifications.conf
// ============================================================
// Didactum Benachrichtigungen
// ============================================================

// Benachrichtigung für Leckage (sofort, alle Probleme)
apply Notification "didactum-leckage-alert" to Service {
    import "mail-service-notification"
    command  = "mail-service-notification"
    users    = [ "admin" ]
    types    = [ Problem, Recovery ]
    states   = [ Critical, Warning ]
    interval = 0   // Keine Wiederholungen – einmalig alarmieren

    assign where service.name == "Didactum Leckage"
}

// Benachrichtigung für Temperatur (alle 30 Minuten wiederholen)
apply Notification "didactum-temperatur-alert" to Service {
    import "mail-service-notification"
    command  = "mail-service-notification"
    users    = [ "admin" ]
    types    = [ Problem, Recovery ]
    states   = [ Critical, Warning ]
    interval = 30m

    assign where service.name == "Didactum Temperatur"
}

// Benachrichtigung für alle Didactum-Sensoren
apply Notification "didactum-sensor-alert" to Service {
    import "mail-service-notification"
    command  = "mail-service-notification"
    users    = [ "admin" ]
    types    = [ Problem, Recovery, Acknowledgement ]
    states   = [ Critical, Warning, Unknown ]
    interval = 1h

    assign where "didactum-sensoren" in service.groups
}

Schritt 5 – Konfiguration laden

sudo icinga2 daemon -C && sudo systemctl reload icinga2

12. Test und Fehlersuche

check_snmp direkt testen

# Temperatur testen
/usr/lib/nagios/plugins/check_snmp \
    -H 192.168.1.50 -C didactum_icinga -P 2 \
    -o .1.3.6.1.4.1.46501.5.1.1.7.101001

# Erwartete Ausgabe:
# SNMP OK - 235 | iso.3.6.1.4.1.46501.5.1.1.7.101001=235
# (235 = 23,5 °C)

Konfiguration validieren

sudo icinga2 daemon -C
# Ausgabe: "Configuration OK, ready to start."

Service-Status prüfen

sudo systemctl status icinga2
sudo systemctl status snmptrapd
sudo systemctl status snmptt

Icinga 2 Log einsehen

# Allgemeines Log
sudo tail -f /var/log/icinga2/icinga2.log

# Fehler-Log
sudo tail -f /var/log/icinga2/error.log

# Debug-Modus aktivieren (temporär)
sudo icinga2 feature enable debuglog
sudo systemctl reload icinga2
sudo tail -f /var/log/icinga2/debug.log

Fehlermeldungen und Lösungen

ProblemUrsache & Lösung
check_snmp: No response from remote hostFirewall blockiert UDP 161; SNMP am Didactum nicht aktiv; falsche IP → prüfen
check_snmp: TimeoutCommunity String falsch; Netzwerkverbindung unterbrochen → snmpwalk testen
SNMP OK, aber Temperatur 10× zu großRohwert nicht skaliert → Schwellwerte × 10 in der CheckCommand-Konfiguration
Service bleibt dauerhaft UNKNOWNPlugin nicht gefunden; PluginDir falsch → which check_snmp ausführen
Konfigurationsfehler beim Reloadsudo icinga2 daemon -C ausführen und Fehlermeldung lesen
Keine E-Mail bei AlarmPostfix läuft nicht; User-E-Mail-Adresse fehlt; Notification-Feature nicht aktiv
SNMP-Traps kommen nicht anUDP 162 in Firewall geschlossen; snmptrapd läuft nicht; Community String falsch
Apply-Rule greift nichtHost nicht in Hostgruppe „didactum-monitoring" → groups-Eintrag im Host prüfen

snmpwalk zur Diagnose

# Alle Sensoren auf einmal auflisten
snmpwalk -v 2c -c didactum_icinga 192.168.1.50 \
    .1.3.6.1.4.1.46501.5.1.1

# Mit MIB-Namen (nach MIB-Installation)
snmpwalk -v 2c -c didactum_icinga -m ALL 192.168.1.50 \
    DIDACTUM-MIB::sensorValue

13. Abschluss-Checkliste

Didactum-Gerät

  • SNMP aktiviert (v2c oder v3)
  • Community String gesetzt (nicht „public")
  • Trap-Empfänger-IP auf Icinga-Server gesetzt
  • Trap-Port 162 eingetragen
  • MIB-Datei heruntergeladen

Icinga 2 Server – Pakete & MIB

  • Pakete snmp, snmp-mibs-downloader, monitoring-plugins installiert
  • MIB-Datei unter /usr/share/snmp/mibs/ gespeichert
  • /etc/snmp/snmp.conf: mibs ALL eingetragen
  • snmpwalk-Test erfolgreich – Sensorwerte sichtbar
  • check_snmp direkt auf der Kommandozeile erfolgreich getestet

Icinga 2 Konfiguration

  • Verzeichnis /etc/icinga2/conf.d/didactum/ angelegt
  • hosts.conf: Host-Objekt mit SNMP-Variablen und OIDs erstellt
  • groups.conf: Hostgruppe und Servicegruppe angelegt
  • commands.conf: CheckCommands für alle Sensortypen erstellt
  • services.conf: Service-Objekte für alle Sensoren angelegt
  • Konfiguration mit icinga2 daemon -C validiert (keine Fehler)
  • Icinga 2 neu geladen: systemctl reload icinga2

Services in Icinga Web 2

  • Host „didactum-monitor-01" erscheint in der Host-Übersicht
  • Services erscheinen und zeigen aktuelle Messwerte
  • Temperaturschwellwerte korrekt skaliert (×10)
  • Leckagesensor zeigt OK (Wert 0)

Benachrichtigung

  • Notification-Feature aktiviert
  • E-Mail-Adresse im User-Objekt hinterlegt
  • Postfix / Mailversand auf dem Server funktioniert
  • Notification-Objekte für kritische Sensoren angelegt
  • Test-Alarm ausgelöst und E-Mail empfangen

SNMP Traps (optional)

  • snmptrapd und snmptt installiert und konfiguriert
  • snmptt.conf: Didactum Enterprise OID eingetragen
  • Icinga 2 API aktiviert und erreichbar
  • Passiver Service „Didactum SNMP Trap" angelegt
  • Test-Trap empfangen und in Icinga Web 2 sichtbar

Diese Webseite nutzt Cookies

Diese Webseite nutzt Cookies zur Verbesserung des Erlebnisses unserer Besucher. Indem Sie weiterhin auf dieser Webseite navigieren, erklären Sie sich mit unserer Verwendung von Cookies einverstanden.

Essenzielle Cookies ermöglichen grundlegende Funktionen und sind für die einwandfreie Funktion der Website erforderlich.
Statistik Cookies erfassen Informationen anonym. Diese Informationen helfen uns zu verstehen, wie unsere Besucher unsere Website nutzen.
Marketing-Cookies werden von Drittanbietern oder Publishern verwendet, um personalisierte Werbung anzuzeigen. Sie tun dies, indem sie Besucher über Websites hinweg verfolgen.