Didactum monitoring and collectd integration
Complete step-by-step guide for integrating Didactum monitoring devices and sensors into collectd via SNMP – including plugin configuration, RRDtool output, Grafana integration, threshold alarms, and InfluxDB integration.
- Software: collectd 5.x (Ubuntu / Debian)
- Plugin: SNMP Plugin (collectd-snmp)
- Output: RRDtool, InfluxDB, or Graphite (optional)
- Visualization: Grafana (recommended)
- Devices: Didactum Monitoring System 100T / 300T / 500T / 550T
- Sensors: Temperature, leakage, humidity, door contact, smoke
1. Prerequisites and System Overview
collectd Server
- Ubuntu 20.04 / 22.04 LTS or Debian 11/12
- collectd 5.x installed
- Packages: collectd, collectd-utils, snmp, snmp-mibs-downloader
- UDP port 161 open outbound for SNMP polling
- Network access to the Didactum device
Didactum Device
- Monitoring System 100T, 300T, 500T, or 550T
- SNMP enabled (v1 or v2c – collectd-snmp does not natively support v3)
- MIB file available for download in the web interface
Architecture & Data Flow
[Didactum Monitoring System]
IP: 192.168.1.50
|
| SNMP polling (UDP 161) every 60 seconds
v
[collectd Daemon]
/etc/collectd/collectd.conf
|
|-- RRDtool --> /var/lib/collectd/rrd/ (file storage)
|-- InfluxDB --> localhost (time-series DB)
|-- Graphite --> localhost:2003 (alternative)
v
[Grafana Dashboard]
localhost
Important collectd Directories
/etc/collectd/collectd.conf <-- Main configuration /etc/collectd/collectd.conf.d/ <-- Modular configuration files /var/lib/collectd/rrd/ <-- RRD database files /usr/lib/collectd/ <-- Plugin binaries /usr/share/doc/collectd-core/ <-- Example configurations
2. Enable SNMP on the Didactum device
Step 1 – Open Web Interface
Open in browser: 192.168.1.50 (adjust IP of the Didactum device)
Step 2 – Open SNMP Settings
System Settings → SNMP
Step 3 – Enter the Following Values
| Field in Didactum Web Interface | Value |
|---|---|
| Enable SNMP | Enabled |
| SNMP Version | v2c (collectd-snmp supports v1 and v2c) |
| Community String | didactum_collectd (do not use “public”!) |
| SNMP Port | 161 |
| Trap Receiver IP | 192.168.1.10 (IP of the collectd server, optional) |
| Trap Port | 162 |
Note:
The collectd SNMP plugin natively supports only SNMPv1 and v2c. For SNMPv3, an external wrapper script must be used via the exec plugin.
3. Install collectd
Step 1 – Install Packages
sudo apt update
sudo apt install -y collectd collectd-utils \\
snmp snmp-mibs-downloader \\
librrd-dev rrdtool
Step 2 – Check collectd Version
collectd -h | head -5 # or: dpkg -l collectd
Step 3 – Enable collectd Service at System Startup
sudo systemctl enable collectd sudo systemctl start collectd sudo systemctl status collectd
4. Install MIB File and Test SNMP
Step 1 – Download MIB File from the Didactum Web Interface
System Settings → SNMP → "Download MIB File" → didactum.mib
Step 2 – Install MIB on the collectd Server
sudo cp didactum.mib /usr/share/snmp/mibs/ # SNMP configuration for MIB usage echo "mibdirs /usr/share/snmp/mibs" | sudo tee -a /etc/snmp/snmp.conf echo "mibs ALL" | sudo tee -a /etc/snmp/snmp.conf
Step 3 – Test SNMP Connection
# List all sensor values
snmpwalk -v 2c -c didactum_collectd 192.168.1.50 \\
.1.3.6.1.4.1.46501.5.1.1
# Query a single temperature value (raw value ÷ 10 = degrees Celsius)
snmpget -v 2c -c didactum_collectd 192.168.1.50 \\
.1.3.6.1.4.1.46501.5.1.1.7.101001
# Query leakage status (0=dry, 1=water detected)
snmpget -v 2c -c didactum_collectd 192.168.1.50 \\
.1.3.6.1.4.1.46501.5.1.1.7.107001
If values appear without error messages, the SNMP connection is ready for collectd.
5. Configure the SNMP Plugin
Step 1 – Create Configuration File for Didactum
sudo nano /etc/collectd/collectd.conf.d/didactum-snmp.conf
Step 2 – Insert the Following Content
# ================================================================
# collectd SNMP plugin – Didactum Monitoring System
# File: /etc/collectd/collectd.conf.d/didactum-snmp.conf
# ================================================================
LoadPlugin snmp
<Plugin snmp>
# --------------------------------------------------------------
# DATA blocks: Definition of the metrics to be queried
# These blocks describe WHAT is queried.
# The Host block defines WHERE the query is performed.
# --------------------------------------------------------------
# --- Temperature sensor (digital, sensor ID 101001) ------------
# Scale 0.1: raw value ÷ 10 = degrees Celsius (235 = 23.5 °C)
<Data "didactum_temp_01">
Type "temperature"
Table false
Instance "sensor_temperature_01"
Values ".1.3.6.1.4.1.46501.5.1.1.7.101001"
Scale 0.1
</Data>
# --- Temperature sensor status (0=OK, 1=Alarm, 2=No signal) ---
<Data "didactum_temp_status_01">
Type "gauge"
Table false
Instance "sensor_temp_status_01"
Values ".1.3.6.1.4.1.46501.5.1.1.6.101001"
</Data>
# --- Leakage sensor (0=dry, 1=water detected) ------------------
<Data "didactum_leak_01">
Type "gauge"
Table false
Instance "sensor_leakage_01"
Values ".1.3.6.1.4.1.46501.5.1.1.7.107001"
</Data>
# --- Leakage sensor status -------------------------------------
<Data "didactum_leak_status_01">
Type "gauge"
Table false
Instance "sensor_leakage_status_01"
Values ".1.3.6.1.4.1.46501.5.1.1.6.107001"
</Data>
# --- Humidity sensor (value in %) ------------------------------
<Data "didactum_hum_01">
Type "humidity"
Table false
Instance "sensor_humidity_01"
Values ".1.3.6.1.4.1.46501.5.1.1.7.102001"
</Data>
# --- Door contact (0=closed, 1=open) ---------------------------
<Data "didactum_door_01">
Type "gauge"
Table false
Instance "sensor_door_01"
Values ".1.3.6.1.4.1.46501.5.1.1.7.104001"
</Data>
# --- Smoke detector (0=OK, 1=alarm) ----------------------------
<Data "didactum_smoke_01">
Type "gauge"
Table false
Instance "sensor_smoke_01"
Values ".1.3.6.1.4.1.46501.5.1.1.7.106001"
</Data>
# --- Analog temperature sensor (newer models OID 39052) --------
<Data "didactum_temp_analog_01">
Type "temperature"
Table false
Instance "sensor_temp_analog_01"
Values ".1.3.6.1.4.1.39052.5.2.1.7.201001"
Scale 0.1
</Data>
# --------------------------------------------------------------
# HOST block: Connection parameters to the Didactum device
# This block defines WHERE and HOW the query is performed.
# --------------------------------------------------------------
<Host "didactum-monitor-01">
Address "192.168.1.50"
Version 2
Community "didactum_collectd"
Interval 60 # polling interval in seconds
Timeout 5 # timeout in seconds
Retries 3 # number of retry attempts
# Query all defined Data blocks:
Collect "didactum_temp_01"
Collect "didactum_temp_status_01"
Collect "didactum_leak_01"
Collect "didactum_leak_status_01"
Collect "didactum_hum_01"
Collect "didactum_door_01"
Collect "didactum_smoke_01"
Collect "didactum_temp_analog_01"
</Host>
# --------------------------------------------------------------
# Second device (commented out – enable if needed)
# --------------------------------------------------------------
# <Host "didactum-monitor-02">
# Address "192.168.1.51"
# Version 2
# Community "didactum_collectd"
# Interval 60
# Collect "didactum_temp_01"
# Collect "didactum_leak_01"
# </Host>
</Plugin>
Step 3 – Ensure the SNMP Plugin Is Loaded in the Main Configuration
sudo nano /etc/collectd/collectd.conf
Check whether the following line exists and is not commented out:
LoadPlugin snmp
If modular configuration is enabled, ensure that the conf.d directory is included:
Include "/etc/collectd/collectd.conf.d/*.conf"
Step 4 – Register Custom Types for Leakage and Status (optional)
collectd already knows the gauge type. For cleaner naming, a custom types.db extension can be created:
sudo nano /etc/collectd/didactum-types.db
# Didactum custom types # Format: type_name ds_name:ds_type:min:max leakage_status value:GAUGE:0:2 door_status value:GAUGE:0:1 smoke_status value:GAUGE:0:1 sensor_status value:GAUGE:0:2
Include it in collectd.conf:
TypesDB "/usr/share/collectd/types.db" TypesDB "/etc/collectd/didactum-types.db"
6. Configuring Output Plugins
Option A – RRDtool (local file storage)
sudo nano /etc/collectd/collectd.conf
# Enable RRDtool plugin LoadPlugin rrdtool <Plugin rrdtool> DataDir "/var/lib/collectd/rrd" CacheTimeout 120 CacheFlush 900 WritesPerSecond 50 </Plugin>
Create directory:
sudo mkdir -p /var/lib/collectd/rrd sudo chown collectd:collectd /var/lib/collectd/rrd
RRD files are automatically created under the following path:
/var/lib/collectd/rrd/didactum-monitor-01/snmp/ temperature-sensor_temperatur_01.rrd gauge-sensor_leckage_01.rrd humidity-sensor_feuchte_01.rrd gauge-sensor_tuer_01.rrd gauge-sensor_rauch_01.rrd
Option B – InfluxDB (recommended for Grafana)
# collectd plugin for InfluxDB output
LoadPlugin network
<Plugin network>
<Server "192.168.1.10" "25826">
SecurityLevel "None"
</Server>
</Plugin>
Enable the collectd input in the InfluxDB configuration:
# /etc/influxdb/influxdb.conf [[collectd]] enabled = true bind-address = ":25826" database = "collectd" typesdb = "/usr/share/collectd/types.db"
Option C – CSV output (for simple evaluation)
LoadPlugin csv <Plugin csv> DataDir "/var/lib/collectd/csv" StoreRates true </Plugin>
Option D – Write-HTTP (for external systems)
LoadPlugin write_http
<Plugin write_http>
<Node "didactum-backend">
URL "http://192.168.1.20:9999/collectd"
Format "JSON"
StoreRates false
</Node>
</Plugin>
7. Threshold Plugin: Configuring Alarms
The threshold plugin monitors collected values against defined limits and sends notifications when thresholds are exceeded.
Step 1 – Enable Threshold Plugin
sudo nano /etc/collectd/collectd.conf
LoadPlugin threshold
Step 2 – Create Threshold Configuration File
sudo nano /etc/collectd/collectd.conf.d/didactum-thresholds.conf
# ================================================================
# collectd threshold configuration – Didactum sensors
# File: /etc/collectd/collectd.conf.d/didactum-thresholds.conf
# ================================================================
LoadPlugin threshold
<Plugin threshold>
# --------------------------------------------------------------
# Host-specific thresholds for Didactum Monitor 01
# --------------------------------------------------------------
<Host "didactum-monitor-01">
# --- Temperature sensor -------------------------------------
# Scale has already been set to 0.1 in the SNMP configuration
# Therefore we work directly with Celsius values here
<Type "temperature">
Instance "sensor_temperatur_01"
WarningMax 28.0 # Warning at 28.0 °C
FailureMax 35.0 # Critical at 35.0 °C
WarningMin 5.0 # Warning below 5.0 °C (too cold)
FailureMin 2.0 # Critical below 2.0 °C
Persist true # Repeat alarm for each measurement
PersistOK false # No OK message for each value
</Type>
# --- Leakage sensor -----------------------------------------
# Value 1 = water detected = immediately critical
<Type "gauge">
Instance "sensor_leckage_01"
FailureMax 0.5 # From 0.5 (= water detected) critical
Persist true # Repeat alarm while water present
Invert false
</Type>
# --- Leakage status -----------------------------------------
<Type "gauge">
Instance "sensor_leckage_status_01"
FailureMax 0.5 # Status > 0 = alarm or error
Persist true
</Type>
# --- Humidity -----------------------------------------------
<Type "humidity">
Instance "sensor_feuchte_01"
WarningMax 80.0 # Warning at 80 %
FailureMax 90.0 # Critical at 90 %
WarningMin 20.0 # Warning below 20 %
FailureMin 10.0 # Critical below 10 %
Persist false
</Type>
# --- Door contact -------------------------------------------
# 1 = door open = warning
<Type "gauge">
Instance "sensor_tuer_01"
WarningMax 0.5 # From 0.5 (= open) warning
Persist true # Repeat alarm while open
</Type>
# --- Smoke detector -----------------------------------------
# 1 = smoke = immediately critical
<Type "gauge">
Instance "sensor_rauch_01"
FailureMax 0.5 # From 0.5 (= alarm) critical
Persist true
</Type>
# --- Temperature sensor status ------------------------------
# 0=OK, 1=Alarm, 2=No signal
<Type "gauge">
Instance "sensor_temp_status_01"
FailureMax 0.5 # Any value > 0 is a problem
Persist true
</Type>
</Host>
</Plugin>
8. Notification via Email (exec and notify_email Plugins)
Option A – notify_email plugin (direct, simple)
sudo nano /etc/collectd/collectd.conf.d/didactum-notify.conf
# Email notification on threshold breach LoadPlugin notify_email <Plugin notify_email> SMTPServer "mail.yourdomain.com" SMTPPort 587 SMTPUser "collectd@yourdomain.com" SMTPPassword "YourMailPassword" From "collectd@yourdomain.com" # Recipients (multiple possible): Recipient "admin@yourdomain.com" # Subject prefix: Subject "[Didactum ALARM] %s" </Plugin>
Option B – exec plugin with custom notification script
sudo nano /etc/collectd/collectd.conf.d/didactum-exec.conf
LoadPlugin exec <Plugin exec> # Call notification script when threshold is triggered NotificationExec "collectd" "/etc/collectd/scripts/didactum-alarm.sh" </Plugin>
Create alarm script:
sudo mkdir -p /etc/collectd/scripts sudo nano /etc/collectd/scripts/didactum-alarm.sh
#!/bin/bash # ================================================================ # Didactum alarm script for collectd # Called when a threshold is exceeded # ================================================================ # Notification variables are set by collectd: # NOTIF_SEVERITY = FAILURE | WARNING | OKAY # NOTIF_HOST = Hostname # NOTIF_PLUGIN = Plugin name # NOTIF_TYPE = Metric type # NOTIF_INSTANCE = Instance name # NOTIF_MESSAGE = Error message # Send mail only on FAILURE or WARNING if [ "$NOTIF_SEVERITY" = "OKAY" ]; then exit 0 fi RECIPIENT="admin@yourdomain.com" SENDER="collectd@yourdomain.com" SUBJECT="[Didactum $NOTIF_SEVERITY] $NOTIF_HOST – $NOTIF_TYPE ($NOTIF_INSTANCE)" MESSAGE=" Didactum Sensor Alarm ===================== Timestamp: $(date '+%Y-%m-%d %H:%M:%S') Severity: $NOTIF_SEVERITY Host: $NOTIF_HOST Plugin: $NOTIF_PLUGIN Type: $NOTIF_TYPE Instance: $NOTIF_INSTANCE Message: $NOTIF_MESSAGE " echo "$MESSAGE" | mail -s "$SUBJECT" -r "$SENDER" "$RECIPIENT"
sudo chmod +x /etc/collectd/scripts/didactum-alarm.sh sudo chown collectd:collectd /etc/collectd/scripts/didactum-alarm.sh
Ensure mail delivery (Postfix) on the server:
sudo apt install postfix mailutils -y echo "Test mail collectd" | mail -s "Test" admin@yourdomain.com
9. Set up a Grafana Dashboard
Step 1 – Install Grafana (if not already installed)
sudo apt install -y software-properties-common sudo apt install -y grafana sudo systemctl enable grafana-server sudo systemctl start grafana-server # Grafana reachable at: [http://192.168.1.10:3000](http://192.168.1.10:3000) # Default login: admin / admin
Step 2 – Configure Data Source
Option A: RRDtool data source
Grafana → Configuration → Data Sources → Add data source → Select SimpleJSON or collectd-RRD plugin → URL: localhost (install RRD proxy)
Option B: InfluxDB data source (recommended)
Grafana → Configuration → Data Sources → Add data source → InfluxDB URL: localhost Database: collectd HTTP Method: GET → Save & Test
Step 3 – Create New Dashboard
Grafana → + → Dashboard → Add new panel
Step 4 – Panel for Temperature Trend
InfluxDB query for Grafana:
SELECT mean("value") FROM "temperature"
WHERE ("host" = 'didactum-monitor-01'
AND "type_instance" = 'sensor_temperatur_01')
AND $timeFilter
GROUP BY time($__interval) fill(null)
| Panel setting | Value |
|---|---|
| Panel type | Time series (line chart) |
| Panel title | Room temperature – Didactum Sensor 01 |
| Unit | Temperature → Celsius (°C) |
| Threshold Warning | 28 |
| Threshold Critical | 35 |
| Y-axis Min | 0 |
| Y-axis Max | 50 |
Step 5 – Panel for Leakage Status
SELECT last("value") FROM "gauge"
WHERE ("host" = 'didactum-monitor-01'
AND "type_instance" = 'sensor_leckage_01')
AND $timeFilter
| Panel setting | Value |
|---|---|
| Panel type | Stat (single value display) |
| Panel title | Leakage Status |
| Value Mapping 0 | ✅ Dry / OK |
| Value Mapping 1 | ? Water detected! |
| Threshold 0 | Green (OK) |
| Threshold 1 | Red (Alarm) |
Step 6 – Panel for Humidity
SELECT mean("value") FROM "humidity"
WHERE ("host" = 'didactum-monitor-01'
AND "type_instance" = 'sensor_feuchte_01')
AND $timeFilter
GROUP BY time($__interval) fill(null)
Step 7 – Save Dashboard
Top right: Save icon → Name: "Didactum Monitoring" → Save
10. SNMP OID Reference
All Didactum OIDs begin with .1.3.6.1.4.1.46501 (older firmware) or .1.3.6.1.4.1.39052 (newer models). The sensor ID is appended at the end.
OID Fields per Sensor
| Field | Meaning | Example |
|---|---|---|
| .1.x.SENSOR_ID | Sensor ID | .1.3.6.1.4.1.46501.5.1.1.1.101001 |
| .5.x.SENSOR_ID | Sensor name | .1.3.6.1.4.1.46501.5.1.1.5.101001 |
| .6.x.SENSOR_ID | Status (0=OK, 1=Alarm, 2=No signal) | .1.3.6.1.4.1.46501.5.1.1.6.101001 |
| .7.x.SENSOR_ID | Measured value (current) | .1.3.6.1.4.1.46501.5.1.1.7.101001 |
Sensor Types with OIDs and collectd Configuration
| Sensor type | Sensor ID | OID value | collectd type | Scale / note |
|---|---|---|---|---|
| Temperature sensor (digital) | 101001 | .1.3.6.1.4.1.46501.5.1.1.7.101001 | temperature | Scale 0.1 (255 = 25.5 °C) |
| Temperature sensor (analog) | 201001 | .1.3.6.1.4.1.39052.5.2.1.7.201001 | temperature | Scale 0.1 |
| Water sensor / leakage | 107001 | .1.3.6.1.4.1.46501.5.1.1.7.107001 | gauge | 0=dry, 1=water |
| General sensor status | any | .1.3.6.1.4.1.46501.5.1.1.6.SENSOR_ID | gauge | 0=OK, 1=Alarm, 2=No signal |
| Humidity | 102001 | .1.3.6.1.4.1.46501.5.1.1.7.102001 | humidity | Value in % (65 = 65 %) |
| Potential-free contact | 101003 | .1.3.6.1.4.1.39052.5.1.1.7.101003 | gauge | 0=open, 1=closed |
| Door contact | 104001 | .1.3.6.1.4.1.46501.5.1.1.7.104001 | gauge | 0=closed, 1=open |
| Smoke detector | 106001 | .1.3.6.1.4.1.46501.5.1.1.7.106001 | gauge | 0=no smoke, 1=alarm |
Find the sensor ID:
In the Didactum web interface under System Tree → Select sensor → Details. This ID is appended to the end of the OID.
Scale option in collectd:
The Scale 0.1 parameter in the Data block causes collectd to automatically divide the raw value by 10. This stores 235 directly as 23.5 – correct display in Grafana without manual conversion.
MIB prefix by model:
Older devices use .1.3.6.1.4.1.46501, newer models may use .1.3.6.1.4.1.39052. Refer to the MIB file of your device for the exact OIDs.
11. Testing and Debugging
Test Configuration Without Starting the Daemon
# Check configuration for syntax errors sudo collectd -t -C /etc/collectd/collectd.conf # Start collectd in the foreground with verbose output sudo collectd -f -C /etc/collectd/collectd.conf # Stop with Ctrl+C
Restart collectd Service & Check Status
sudo systemctl restart collectd sudo systemctl status collectd sudo journalctl -u collectd -f --since "5 minutes ago"
Check RRD Files
# Check whether RRD files have been created
ls -la /var/lib/collectd/rrd/didactum-monitor-01/
# Show the last value of an RRD file
rrdtool lastupdate \\
/var/lib/collectd/rrd/didactum-monitor-01/snmp/\\
temperature-sensor_temperatur_01.rrd
# Generate a quick graph (last hour)
rrdtool graph /tmp/temp_test.png \\
--start -3600 \\
--title "Didactum Temperature" \\
--vertical-label "Degrees Celsius" \\
DEF:temp=/var/lib/collectd/rrd/didactum-monitor-01/snmp/\\
temperature-sensor_temperatur_01.rrd:value:AVERAGE \\
LINE1:temp#FF0000:"Temperature"
Test SNMP Connection Directly
snmpwalk -v 2c -c didactum_collectd 192.168.1.50 \\
.1.3.6.1.4.1.46501.5.1.1
Error Messages and Solutions
| Problem | Cause & Solution |
|---|---|
| collectd does not start | Syntax error in collectd.conf → run collectd -t and read the error |
| No RRD files for Didactum | SNMP plugin not loaded; community string incorrect; device not reachable |
| snmp plugin: host "..." reported a failure | Device not reachable; firewall blocks UDP 161; community string incorrect |
| Temperature value 10× too high in Grafana | Scale 0.1 missing in the Data block → add SNMP configuration |
| Threshold alarms do not arrive | notify_email plugin not loaded; SMTP data incorrect; alarm script not executable |
| No data in Grafana/InfluxDB | network plugin not configured; InfluxDB collectd input not enabled |
| "Unknown type" error message | Type "humidity" or "temperature" not in types.db → check TypesDB entry |
| Data block before Host block? | Data blocks must be defined BEFORE the Host block (top-down parsing) |
View collectd Log
# Systemd journal sudo journalctl -u collectd -f # Direct log file (if syslog plugin is active) sudo tail -f /var/log/syslog | grep collectd # Enable verbose logging in collectd.conf: # LoadPlugin logfile # <Plugin logfile> # LogLevel debug # File "/var/log/collectd.log" # </Plugin>
12. Final Checklist
Didactum Device
- SNMP enabled (v2c)
- Community string set (not "public")
- Trap receiver IP entered (optional)
- MIB file downloaded
- snmpwalk test from the collectd server successful
collectd Server – Packages & MIB
- Packages collectd, collectd-utils, snmp, snmp-mibs-downloader installed
- MIB file saved under /usr/share/snmp/mibs/
- /etc/snmp/snmp.conf: mibs ALL entered
- collectd service running: systemctl status collectd
SNMP Plugin Configuration
- File /etc/collectd/collectd.conf.d/didactum-snmp.conf created
- Data blocks defined for all sensor types
- Scale 0.1 set for temperature sensors
- Host block entered with correct IP and community
- Collect instructions present for all data blocks
- Configuration validated with collectd -t (no errors)
Output & Visualization
- RRDtool plugin configured and RRD files are being created
- Alternatively: InfluxDB integration set up
- Grafana data source connected
- Dashboard with temperature and leakage panels created
- Temperature display in °C correct (Scale 0.1 applied)
Alarms & Notification
- Threshold plugin enabled and configured
- Thresholds set for temperature (warning 28°C, critical 35°C)
- Threshold set for leakage (critical from 0.5)
- Email plugin (notify_email or exec) configured
- Test message received by email