Didactum Monitoring & Monitorix Integration
Complete step-by-step guide for integrating Didactum monitoring devices and sensors into Monitorix via SNMP — including SNMP test, shell scripts, ambsens.pm configuration, MIB import template, alert configuration, and troubleshooting.
Product note: Monitorix is a lightweight open-source system monitoring tool for Linux. It has no native SNMP module, but the Ambient Sensor module (ambsens.pm) can use any shell command as a data source — ideal for SNMP polling via snmpget. This guide covers the complete integration.
- Software: Monitorix ≥ 3.9
- Protocol: SNMP v1 / v2c / v3
- Devices: Didactum Monitoring System 100T / 300T / 500T / 550T
- Sensors: Temperature, leak, humidity, door contact, smoke
1. Prerequisites & system overview
Monitorix host
- Monitorix ≥ 3.9 installed (Debian/Ubuntu/RHEL)
- snmp and bc packages installed
- UDP port 161 open outbound to the Didactum device
- Network access to the Didactum device available
Didactum device
- Monitoring System 100, 500, 500 II, or 550T
- SNMP enabled (v2c recommended)
- Device reachable by ICMP from the Monitorix host
- MIB file available in the web interface
Architecture & data flow
[Monitorix Host] [Didactum Monitoring System]
IP: 192.168.1.10 IP: 192.168.1.50
ambsens.pm (every 5 min.)
Shell script: didactum_sensor.sh
-- SNMP polling UDP 161 (snmpget) -->
<-- INTEGER value (e.g. 215 = 21.5 °C) ------
Install required packages
# Debian / Ubuntu sudo apt install snmp snmp-mibs-downloader bc monitorix # RHEL / Rocky / AlmaLinux sudo dnf install net-snmp-utils bc monitorix
2. Enable SNMP on the Didactum device
Step 1 – Open web interface
Open in browser: [http://192.168.1.50](http://192.168.1.50) (adjust the Didactum device IP)
Step 2 – Open SNMP settings
Preferences → SNMP
Step 3 – Enter the following values
| Field in the Didactum web interface | Value |
|---|---|
| Enable SNMP | Enabled |
| SNMP version | v2c (recommended) |
| Community string | didactum_mon (do not use “public”!) |
| SNMP port | 161 |
Save the settings. Test the SNMP connection from the Monitorix host beforehand:
snmpwalk -v2c -c didactum_mon 192.168.1.50 .1.3.6.1.4.1.46501.5.1.1
Download and provide MIB file
# In the Didactum web interface: # Preferences → SNMP → Download MIB file # Copy the downloaded MIB to the Monitorix host sudo cp DIDACTUM-MIB.mib /usr/share/snmp/mibs/ # Enable MIB usage sudo sed -i 's/^mibs :#/mibs :/' /etc/snmp/snmp.conf
3. SNMP OID reference
All Didactum OIDs begin with .1.3.6.1.4.1.46501 (older/current firmware). 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 (string) | .1.3.6.1.4.1.46501.5.1.1.5.101001 |
| .6.x.SENSOR_ID | Status (0=normal, 1=warning, 2=critical, 3=error) | .1.3.6.1.4.1.46501.5.1.1.6.101001 |
| .7.x.SENSOR_ID | Measurement value (current) | .1.3.6.1.4.1.46501.5.1.1.7.101001 |
Sensor types with OIDs and scaling
| Sensor type | Sensor ID | OID measurement value | Scaling | Example |
|---|---|---|---|---|
| Temperature sensor Port 1 | 101001 | .1.3.6.1.4.1.46501.5.1.1.7.101001 | Raw value ÷ 10 = °C | 215 = 21.5 °C |
| Temperature sensor Port 2 | 101002 | .1.3.6.1.4.1.46501.5.1.1.7.101002 | Raw value ÷ 10 = °C | 235 = 23.5 °C |
| Humidity sensor Port 1 | 102001 | .1.3.6.1.4.1.46501.5.1.1.7.102001 | Direct value = %RH | 65 = 65 %RH |
| Combined sensor Temperature (CAN) | 103001 | .1.3.6.1.4.1.46501.5.1.1.7.103001 | Raw value ÷ 10 = °C | 220 = 22.0 °C |
| Combined sensor Humidity (CAN) | 103002 | .1.3.6.1.4.1.46501.5.1.1.7.103002 | Direct value = %RH | 60 = 60 %RH |
| Door contact | 104001 | .1.3.6.1.4.1.46501.5.1.1.7.104001 | 0 = closed, 1 = open | – |
| Smoke detector | 106001 | .1.3.6.1.4.1.46501.5.1.1.7.106001 | 0 = OK, 1 = alarm | – |
| Water sensor / leak (spot) | 107001 | .1.3.6.1.4.1.46501.5.1.1.7.107001 | 0 = dry, 1 = water detected | – |
| Water sensor / leak (cable) | 107002 | .1.3.6.1.4.1.46501.5.1.1.7.107002 | 0 = dry, 1 = water detected | – |
| System status (device) | – | .1.3.6.1.4.1.46501.1.1.0 | 0 = OK, 1 = warning, 2 = critical | – |
Find sensor ID: In the Didactum web interface under System tree → select sensor → details. This ID is appended to the end of the OID.
Determine all sensor IDs via snmpwalk:
# List all sensor names snmpwalk -v2c -c didactum_mon 192.168.1.50 .1.3.6.1.4.1.46501.5.1.1.5 # List all measurement values snmpwalk -v2c -c didactum_mon 192.168.1.50 .1.3.6.1.4.1.46501.5.1.1.7
4. Test SNMP query
Before configuring Monitorix, individual OIDs should be tested manually.
# Query temperature value of sensor 101001 snmpget -v2c -c didactum_mon 192.168.1.50 .1.3.6.1.4.1.46501.5.1.1.7.101001 # Expected output (example): # iso.3.6.1.4.1.46501.5.1.1.7.101001 = INTEGER: 215 # Interpretation: 215 / 10 = 21.5 degrees Celsius # Query status value (0=normal, 1=warning, 2=critical) snmpget -v2c -c didactum_mon 192.168.1.50 .1.3.6.1.4.1.46501.5.1.1.6.101001 # Query leak sensor (0=dry, 1=water detected) snmpget -v2c -c didactum_mon 192.168.1.50 .1.3.6.1.4.1.46501.5.1.1.7.107001
Timeout: No Response error?
Check: firewall (UDP port 161 open?), community string correct, SNMP enabled in the Didactum web interface.
5. Create shell script for Monitorix
The ambsens.pm module expects a shell command to return a single numeric value. Create the following universal wrapper script:
/usr/local/bin/didactum_sensor.sh
#!/bin/bash
# Universal Didactum sensor script for Monitorix ambsens.pm
# Usage: didactum_sensor.sh [temp1|temp2|hum1|leak1|leak2|door1|smoke1]
DIDACTUM_IP="192.168.1.50"
COMMUNITY="didactum_mon"
case "$1" in
temp1) OID=".1.3.6.1.4.1.46501.5.1.1.7.101001"; SCALE=10 ;;
temp2) OID=".1.3.6.1.4.1.46501.5.1.1.7.101002"; SCALE=10 ;;
hum1) OID=".1.3.6.1.4.1.46501.5.1.1.7.102001"; SCALE=1 ;;
leak1) OID=".1.3.6.1.4.1.46501.5.1.1.7.107001"; SCALE=1 ;;
leak2) OID=".1.3.6.1.4.1.46501.5.1.1.7.107002"; SCALE=1 ;;
door1) OID=".1.3.6.1.4.1.46501.5.1.1.7.104001"; SCALE=1 ;;
smoke1) OID=".1.3.6.1.4.1.46501.5.1.1.7.106001"; SCALE=1 ;;
*) echo "0"; exit 1 ;;
esac
VALUE=$(snmpget -v2c -c ${COMMUNITY} -Oqv ${DIDACTUM_IP} ${OID} 2>/dev/null)
[ -z "$VALUE" ] && echo "0" && exit 1
if [ "$SCALE" -gt 1 ]; then
echo "scale=1; ${VALUE} / ${SCALE}" | bc
else
echo "${VALUE}"
fi
# Make script executable and test sudo chmod +x /usr/local/bin/didactum_sensor.sh /usr/local/bin/didactum_sensor.sh temp1 # Expected output: 21.5 /usr/local/bin/didactum_sensor.sh leak1 # Expected output: 0
6. Configure Monitorix (ambsens.pm)
Step 1 – Enable module
In /etc/monitorix/monitorix.conf in the <graph_enable> section:
<graph_enable>
...
ambsens = y
...
</graph_enable>
Step 2 – Set graph title
<graph_name>
ambsens = Didactum_Sensoren
</graph_name>
<graph_title>
ambsens = Didactum Environmental Monitoring
</graph_title>
Step 3 – Configure ambsens block
Create new file: /etc/monitorix/conf.d/didactum.conf
# -------------------------------------------------------
# Didactum Monitoring Integration for Monitorix ambsens.pm
# Monitorix >= 3.9 required
# -------------------------------------------------------
<ambsens>
# Sensor groups (comma-separated list)
list = Temperature, Humidity, Leak, Contacts
# Sensor names per group
<desc>
0 = Server room north, Server room south, Rack 3
1 = Humidity server room, Basement humidity
2 = Underfloor leak, Air conditioning leak
3 = Door contact, Smoke detector
</desc>
# Shell commands per sensor (group_sensor index)
<cmd>
# Group 0: Temperature sensors
0_0 = /usr/local/bin/didactum_sensor.sh temp1
0_1 = /usr/local/bin/didactum_sensor.sh temp2
# Group 1: Humidity sensors
1_0 = /usr/local/bin/didactum_sensor.sh hum1
# Group 2: Leak sensors
2_0 = /usr/local/bin/didactum_sensor.sh leak1
2_1 = /usr/local/bin/didactum_sensor.sh leak2
# Group 3: Contact sensors
3_0 = /usr/local/bin/didactum_sensor.sh door1
3_1 = /usr/local/bin/didactum_sensor.sh smoke1
</cmd>
# Display units per group
<unit>
0 = degrees C
1 = %
2 = Status
3 = Status
</unit>
# Value ranges for RRD graphs (min, max)
<limit>
0 = -10, 60
1 = 0, 100
2 = 0, 1
3 = 0, 1
</limit>
# Alerting: threshold, interval (sec.), script
<alerts>
0_0 = 30, 300, /usr/local/bin/didactum-alert.sh
0_1 = 30, 300, /usr/local/bin/didactum-alert.sh
2_0 = 1, 60, /usr/local/bin/didactum-alert.sh
2_1 = 1, 60, /usr/local/bin/didactum-alert.sh
3_1 = 1, 60, /usr/local/bin/didactum-alert.sh
</alerts>
graphs_per_row = 2
</ambsens>
Step 4 – Restart Monitorix
# Check configuration sudo monitorix --check-config # Restart service sudo systemctl restart monitorix # Watch logs sudo journalctl -u monitorix -f
Note:
After the first start, it may take up to 5 minutes before graphs appear — Monitorix first needs to collect enough data points in the RRD database.
7. MIB import configuration (ready-made template)
This MIB file can be imported directly into iReasoning MIB Browser, PRTG, Zabbix, or Nagios. Save as DIDACTUM-ENV-MIB.mib.
-- ============================================================
-- DIDACTUM-ENV-MIB
-- Simplified MIB template for environmental sensors
-- Enterprise OID: 1.3.6.1.4.1.46501
-- ============================================================
DIDACTUM-ENV-MIB DEFINITIONS ::= BEGIN
IMPORTS
MODULE-IDENTITY, OBJECT-TYPE, Integer32, enterprises
FROM SNMPv2-SMI
DisplayString
FROM SNMPv2-TC;
didactum MODULE-IDENTITY
LAST-UPDATED "202401010000Z"
ORGANIZATION "Didactum Security GmbH"
CONTACT-INFO "support@didactum-security.com"
DESCRIPTION "MIB for Didactum environmental monitoring systems"
::= { enterprises 46501 }
didactumSensors OBJECT IDENTIFIER ::= { didactum 5 }
didactumSensorTable OBJECT IDENTIFIER ::= { didactumSensors 1 }
didactumSensorEntry OBJECT IDENTIFIER ::= { didactumSensorTable 1 }
sensorID OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION "Unique sensor ID"
::= { didactumSensorEntry 1 }
sensorName OBJECT-TYPE
SYNTAX DisplayString
MAX-ACCESS read-only
STATUS current
DESCRIPTION "Sensor designation (configurable in web GUI)"
::= { didactumSensorEntry 5 }
sensorStatus OBJECT-TYPE
SYNTAX Integer32 (0..3)
MAX-ACCESS read-only
STATUS current
DESCRIPTION "Status: 0=Normal 1=Warning 2=Critical 3=Error"
::= { didactumSensorEntry 6 }
sensorValue OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION "Measurement value: temp/humidity raw value divided by 10, leak 0 or 1"
::= { didactumSensorEntry 7 }
-- Common OIDs:
-- Temperature sensor Port 1: .1.3.6.1.4.1.46501.5.1.1.7.101001
-- Temperature sensor Port 2: .1.3.6.1.4.1.46501.5.1.1.7.101002
-- Humidity Port 1: .1.3.6.1.4.1.46501.5.1.1.7.102001
-- Combined sensor Temp: .1.3.6.1.4.1.46501.5.1.1.7.103001
-- Combined sensor Hum: .1.3.6.1.4.1.46501.5.1.1.7.103002
-- Leak spot: .1.3.6.1.4.1.46501.5.1.1.7.107001
-- Leak cable: .1.3.6.1.4.1.46501.5.1.1.7.107002
-- Door contact: .1.3.6.1.4.1.46501.5.1.1.7.104001
-- Smoke detector: .1.3.6.1.4.1.46501.5.1.1.7.106001
-- System status: .1.3.6.1.4.1.46501.1.1.0
END
Net-SNMP configuration
# /etc/snmp/snmp.conf mibdirs /usr/share/snmp/mibs:/etc/snmp/mibs mibs ALL
# Query with symbolic names (after MIB import) snmpget -v2c -c didactum_mon 192.168.1.50 DIDACTUM-ENV-MIB::sensorValue.101001 # Alternatively, numeric OID — always works without MIB import snmpget -v2c -c didactum_mon 192.168.1.50 .1.3.6.1.4.1.46501.5.1.1.7.101001
8. Alert configuration
Monitorix runs an external script when a threshold is exceeded. The parameters are passed as arguments.
Recommended thresholds per sensor type
| Sensor / Event | Threshold (ambsens configuration) | Recommended interval |
|---|---|---|
| Temperature > 28 °C | 28 (after scaling by script) | 300 seconds |
| Temperature > 35 °C (critical) | 35 | 300 seconds |
| Leak detected (value = 1) | 0.5 (from value 1 = alarm) | 60 seconds |
| Smoke detector (value = 1) | 0.5 | 60 seconds |
| Door contact open (value = 1) | 0.5 | 60 seconds |
| Humidity > 80 % | 80 | 300 seconds |
/usr/local/bin/didactum-alert.sh
#!/bin/bash
# Monitorix alert script for Didactum sensors
# Parameters: $1=time interval $2=threshold $3=current value $4=direction
INTERVAL=$1
THRESHOLD=$2
VALUE=$3
DIRECTION=$4
TIMESTAMP=$(date "+%Y-%m-%d %H:%M:%S")
LOGFILE="/var/log/didactum-alerts.log"
MAIL_TO="admin@yourdomain.com"
echo "[${TIMESTAMP}] ALARM! Value=${VALUE} Threshold=${THRESHOLD} Direction=${DIRECTION}" >> ${LOGFILE}
echo "DIDACTUM SENSOR ALERT
Time: ${TIMESTAMP}
Sensor value: ${VALUE}
Threshold: ${THRESHOLD}
Direction: ${DIRECTION}
Please check immediately!" | mail -s "[ALARM] Didactum Sensor - Server Room" ${MAIL_TO}
exit 0
sudo chmod +x /usr/local/bin/didactum-alert.sh
9. Test & troubleshooting
Test SNMP connection
# From the Monitorix host: snmpwalk -v2c -c didactum_mon 192.168.1.50 .1.3.6.1.4.1.46501.5.1.1 # Temperature value (raw value / 10 = degrees Celsius) snmpget -v2c -c didactum_mon 192.168.1.50 .1.3.6.1.4.1.46501.5.1.1.7.101001 # Leak status (0=dry, 1=water) snmpget -v2c -c didactum_mon 192.168.1.50 .1.3.6.1.4.1.46501.5.1.1.7.107001 # Test script manually /usr/local/bin/didactum_sensor.sh temp1 /usr/local/bin/didactum_sensor.sh leak1
Error messages and solutions
| Problem | Cause & solution |
|---|---|
| Timeout / No Response | Community string wrong; SNMP not enabled on Didactum; UDP 161 blocked → test with snmpwalk |
| snmpget: Unknown OID | MIB not loaded → use numeric OID or place MIB in /usr/share/snmp/mibs/ |
| No graphs in Monitorix | Too few data points or configuration error → watch journalctl -u monitorix -f, wait 5–10 min. |
| Wrong temperature value (10x too high) | Scaling forgotten → script outputs raw value, check bc calculation in the script |
| Leak always shows 0 | Wrong sensor ID → run snmpwalk and determine the correct OID |
| Script has no permission | Monitorix runs as a different user → chmod +x and, if needed, add sudo rule |
| RRD data missing after reconfiguration | Recreate RRD file → rm /var/lib/monitorix/ambsens.rrd and restart Monitorix |
View Monitorix logs
# Monitorix status sudo systemctl status monitorix # Live logs sudo journalctl -u monitorix -n 50 # All sensors at a glance snmpwalk -v2c -c didactum_mon 192.168.1.50 .1.3.6.1.4.1.46501.5 # Check RRD database rrdtool info /var/lib/monitorix/ambsens.rrd | head -30
10. Final checklist
Didactum device
- SNMP enabled (v2c or v3)
- Community string set (not “public”): didactum_mon
- Device reachable by ping from the Monitorix host
- MIB file downloaded and placed in /usr/share/snmp/mibs/
- snmpwalk from the Monitorix host successful
Shell script
- /usr/local/bin/didactum_sensor.sh created
- Script is executable (chmod +x)
- Manual call returns correct numeric values
- IP address and community string adjusted in the script
Monitorix configuration
- ambsens = y set in graph_enable
- /etc/monitorix/conf.d/didactum.conf created
- Sensor groups and shell commands configured
- Monitorix service restarted
- Graphs appear in the web interface after 5–10 minutes
Alerting & notification
- Alert script /usr/local/bin/didactum-alert.sh created and executable
- Email address adjusted in the alert script
- Thresholds configured in the <alerts> block
- Test alarm triggered and email received