Language selection:
Skip to main navigation Skip to main content Skip to page footer

Didactum monitoring devices and sensors – integration into Cacti

This guide describes the complete integration of Didactum monitoring devices into Cacti. The objective is the long-term graphical recording and visualization of all sensor values - temperature, humidity, leakage, voltage, door contacts, and others - via the SNMP protocol. Cacti stores these measurement values ​​in RRDs (Round Robin Databases) and automatically generates time-series graphs from them.

1. Fundamentals and Architecture

Cacti is a network-based graphing tool primarily designed for the long-term visualization of measured values. In contrast to Nagios, the focus is not on alerting but on the historical analysis of trends – e.g., temperature development over weeks and months.

Data Flow in Cacti

  1. The Cacti poller queries OID values from the Didactum device via SNMP at configurable intervals (default: 5 minutes).
  2. The raw values are stored in an RRD file (Round Robin Database). Older values are automatically consolidated (averages, maximum, minimum).
  3. Cacti generates time series graphs from the RRD data using rrdtool graph.
  4. Thresholds can be monitored and notifications triggered via the threshold plugin.

Cacti Components Overview

ComponentFunction
Poller (poller.php)Executes SNMP queries, runs via cron every 5 minutes
RRDtoolStores time series data, automatically consolidates old values
Data SourceDefines which OID is queried and into which RRD file it is written
Graph TemplateSpecifies how the data is displayed graphically (lines, colors, labels)
DeviceRepresents a network device (e.g., the Didactum device) with IP and SNMP settings
Data QueryAutomatic detection of all sensors of a device via SNMP tables
Threshold PluginMonitors thresholds and sends notifications when they are exceeded

2. Prerequisites

  • Cacti 1.2.x or newer (latest stable version recommended)
  • Linux server (Debian/Ubuntu or RHEL/CentOS) with root access
  • PHP 7.4 or newer, Apache/Nginx, MariaDB/MySQL
  • RRDtool 1.7 or newer
  • SNMP tools (snmp, snmpd) on the Cacti server
  • Didactum monitoring device reachable on the network, SNMP enabled
  • UDP port 161 open from the Cacti server to the Didactum device
  • Optional: Cacti plugins Threshold, Thold and Monitor for alerting

Example Network Configuration

DeviceIP AddressRole
Cacti Server192.168.1.30Monitoring and graphing server
Didactum Monitoring Unit192.168.1.100Monitored device (SNMP agent)

3. SNMP Preparation on the Didactum Device

3.1 Enable SNMP

  1. Open the Didactum web interface: [http://192.168.1.100](http://192.168.1.100), log in with the admin account.
  2. Navigation: Settings → Network → SNMP (or: Settings → Network → SNMP).
  3. Set the following parameters:
    • SNMP enabled: Yes
    • SNMP version: v2c (recommended for Cacti) or v3
    • Community string: public (change in production)
    • SNMP port: 161
    • Allowed managers: enter the IP of the Cacti server (192.168.1.30)
  4. Save the settings.

3.2 Test connectivity from the Cacti server

# SNMP walk – list all Didactum OIDs:
snmpwalk -v2c -c public 192.168.1.100 1.3.6.1.4.1.3854
 
# Query temperature sensor 1 directly:
snmpget -v2c -c public 192.168.1.100 1.3.6.1.4.1.3854.1.2.2.1.16.1.3.1
 
# All temperature sensors as a table:
snmpwalk -v2c -c public 192.168.1.100 1.3.6.1.4.1.3854.1.2.2.1.16.1.3

Note: 

Didactum returns temperature and voltage values with a factor of 10 (235 = 23.5°C). This must be taken into account in the Cacti data sources.

4. Install and Prepare Cacti

4.1 Install Cacti on Debian/Ubuntu

# Install dependencies:
sudo apt update
sudo apt install cacti cacti-spine rrdtool snmp snmp-mibs-downloader php-snmp -y
 
# During installation: configure database password and web server (Apache).
# Cacti will then be accessible at: <SERVER-IP>/cacti

4.2 Install Cacti on RHEL / CentOS / Rocky Linux

# Enable the EPEL repository:
sudo dnf install epel-release -y
 
# Install Cacti and dependencies:
sudo dnf install cacti rrdtool net-snmp net-snmp-utils php-snmp -y
 
# Start Apache and MariaDB:
sudo systemctl enable --now httpd mariadb

4.3 Set up a cron job for the poller

# Open the crontab for the Cacti user:
sudo crontab -u www-data -e
 
# Add the following entry (polling every 5 minutes):
*/5 * * * * php /usr/share/cacti/poller.php > /dev/null 2>&1

4.4 Configure the Spine poller (recommended for many devices)

Spine is a faster C-based poller than the standard PHP poller and is recommended for production environments:

sudo nano /etc/cacti/spine.conf
DB_Host      127.0.0.1
DB_Database  cacti
DB_User      cactiuser
DB_Pass      cactipassword
DB_Port      3306
Threads      5
Timeout      400
PHP_Path     /usr/bin/php

In Cacti, enable it: Console → Configuration → Settings → Poller → Poller Type: Spine.

4.5 Integrate the Didactum MIB file

# Copy the MIB file to the SNMP directory:
sudo cp DIDACTUM-RACKMONI2-MIB.mib /usr/share/snmp/mibs/
 
# Add to /etc/snmp/snmp.conf:
echo "mibs +DIDACTUM-RACKMONI2-MIB" | sudo tee -a /etc/snmp/snmp.conf
 
# Test:
snmpget -v2c -c public -m +DIDACTUM-RACKMONI2-MIB 192.168.1.100 tempValue.1
Note:
The name of the .mib file may vary. Please check on the device and adjust the script accordingly!

5. Create Didactum Device in Cacti

5.1 Create a new device

  1. Open the Cacti web interface and log in as an administrator.
  2. Navigation: Console → Management → Devices → Add.
  3. Fill in the following fields:
    • Description: Didactum Rack Monitoring – Server Room A
    • Hostname: 192.168.1.100
    • Host Template: Generic SNMP-enabled Host (or a custom template, see section 6)
    • SNMP Version: Version 2
    • SNMP Community: public
    • SNMP Port: 161
    • SNMP Timeout: 500 ms
    • Maximum OIDs per Get Request: 10
  4. Click Create.

5.2 Test the SNMP connection in the device

After creating the device, the SNMP status appears at the top of the page. If configured correctly, the system description of the Didactum device is displayed:

SNMP Information
System: Didactum Rack Monitoring Unit II
Location: Server Room A
Contact: [admin@example.com](mailto:admin@example.com)
Uptime: 15 days, 4:32:18

If no SNMP status appears: check the SNMP community string and IP address, and verify the firewall.

5.3 For SNMP v3 (increased security)

  1. Select SNMP Version: Version 3.
  2. Fill in the additional fields:
    • SNMP Username: SNMP v3 user from the Didactum device
    • SNMP Auth Protocol: SHA
    • SNMP Auth Passphrase: authentication password
    • SNMP Privacy Protocol: AES128
    • SNMP Privacy Passphrase: encryption password

6. Configure Data Queries and SNMP Queries

In Cacti, there are two ways to query SNMP data from the Didactum device:

  • SNMP Custom Collection (single OID): The simplest method for individual sensor values. Each OID is created as a separate data source.
  • Data Query (SNMP table): Automatic detection of all sensors via an SNMP table OID. Useful when you have many similar sensors.

6.1 Create a data source for a single sensor (recommended starting point)

  1. Navigation: Console → Management → Data Sources → Add.
  2. Data Template: select SNMP – Generic OID Template (or create a new template, see 6.3).
  3. Device: select Didactum Rack Monitoring – Server Room A.
  4. In the Data Source Item section:
    • OID: 1.3.6.1.4.1.3854.1.2.2.1.16.1.3.1 (Temperature Sensor 1)
    • Data Source Type: GAUGE (for measured values such as temperature, humidity)
    • Heartbeat: 600 (= 2× polling interval in seconds)
    • Minimum: 0
    • Maximum: U (unlimited)
  5. Save the data source.

6.2 RRDtool data source types for Didactum sensors

Sensor TypeRRD TypeReason
TemperatureGAUGEAbsolute value that can rise and fall
HumidityGAUGEAbsolute value in % RH
Leakage statusGAUGEBinary state value (0 or 1)
VoltageGAUGEAbsolute value in volts
Door contact statusGAUGEBinary state value (0 = closed, 1 = open)
UptimeCOUNTERMonotonically increasing counter (hundredths of a second)

6.3 Create a custom data template for temperature

  1. Navigation: Console → Templates → Data Templates → Add.
  2. Name: Didactum – Temperature Sensor
  3. In the Data Source Item section:
    • Internal Data Source Name: temperature
    • Minimum: -40
    • Maximum: 100
    • Data Source Type: GAUGE
    • Heartbeat: 600
  4. In the Custom Data section:
    • OID: 1.3.6.1.4.1.3854.1.2.2.1.16.1.3.|query_index| (for Data Queries with index)
  5. Save the template.

6.4 XML data query for automatic sensor detection

To automatically detect all temperature sensors, an XML data query file can be created. Store this file in the Cacti directory:

sudo nano /usr/share/cacti/resource/snmp_queries/didactum_temperature.xml
<?xml version="1.0" encoding="UTF-8"?>
<interface>
    <name>Didactum Temperature Sensors</name>
    <description>Query all temperature sensors of the Didactum monitoring device</description>
    <oid_uptime>1.3.6.1.2.1.1.3.0</oid_uptime>
 
    <index_order>sensorIndex</index_order>
    <index_order_type>numeric</index_order_type>
    <index_title_format>|chosen_order_field|</index_title_format>
 
    <fields>
        <sensorIndex>
            <name>Sensor Index</name>
            <direction>input</direction>
            <source>index</source>
        </sensorIndex>
 
        <sensorName>
            <name>Sensor Name</name>
            <direction>input</direction>
            <source>value</source>
            <oid>1.3.6.1.4.1.3854.1.2.2.1.16.1.2</oid>
        </sensorName>
 
        <sensorValue>
            <name>Temperature (raw value x10)</name>
            <direction>input-output</direction>
            <source>value</source>
            <oid>1.3.6.1.4.1.3854.1.2.2.1.16.1.3</oid>
        </sensorValue>
 
        <sensorStatus>
            <name>Sensor Status</name>
            <direction>input</direction>
            <source>value</source>
            <oid>1.3.6.1.4.1.3854.1.2.2.1.16.1.4</oid>
        </sensorStatus>
    </fields>
</interface>

Create analogous XML files for leakage (didactum_leak.xml) and humidity (didactum_humidity.xml) with the corresponding OID base paths (see the OID reference in section 8).

6.5 Import the data query into Cacti

  1. Navigation: Console → Management → SNMP Queries → Add.
  2. Name: Didactum – Temperature Sensors
  3. XML Path: <path_cacti>/resource/snmp_queries/didactum_temperature.xml
  4. Data Input Method: Get SNMP Data (Indexed)
  5. Save.
  6. Assign the data query to the Didactum device: Edit device → Associated Data Queries → Add Data Query → Didactum Temperature Sensors → Add.
  7. Click Run Queries to automatically detect all sensors.

7. Creating Graph Templates

7.1 Graph Template for Temperature

  1. Navigation: Console → Templates → Graph Templates → Add.
  2. Name: Didactum – Temperature
  3. In the Graph Template section:
    • Title: |host_description| – Temperature |query_index|
    • Vertical Label: Degrees Celsius
    • Width: 700
    • Height: 200
  4. Add Graph Template Items:
    • Item 1: Type = DATA SOURCE, Data Source = Temperature Data Source, Color = FF0000, Graph Item Type = LINE2, Text Format = Temperature
    • Item 2: Type = GPRINT, Data Source = as above, Consolidation = LAST, Text Format = Current\\:%8.1lf °C
    • Item 3: Type = GPRINT, Consolidation = MAX, Text Format = Maximum\\:%8.1lf °C
    • Item 4: Type = GPRINT, Consolidation = MIN, Text Format = Minimum\\:%8.1lf °C\\n
  5. Save the template.

Important: 

Since Didactum returns temperature values × 10, either use the CDEF function in Cacti to divide the value or adjust the axis label accordingly:

  1. Navigation: Console → Data Management → CDEFs → Add.
  2. Name: Divide by 10 (Didactum)
  3. CDEF Items:
    • Item 1: Type = Special Data Source, Value = CURRENT_DATA_SOURCE
    • Item 2: Type = Another CDEF, Value = 10,/
  4. Assign the CDEF to the graph template item: Graph Template → Item → CDEF = Divide by 10.

7.2 Graph Template for Leakage (status display)

  1. New Graph Template: Didactum – Leakage Status
  2. Vertical Label: Leakage (0=OK, 1=Alarm)
  3. Graph Item: Type = AREA, Color = 0000FF (blue = normal), Graph Item Type = AREA
  4. Second item with threshold line: Type = HRULE, Value = 0.5, Color = FF0000, Text = Alarm threshold

7.3 Graph Template for Humidity

  1. New Graph Template: Didactum – Humidity
  2. Vertical Label: % relative humidity
  3. Graph Items: LINE2 in blue, GPRINT for Current/Max/Min
  4. Recommendation: draw HRULE lines at 20% (lower limit) and 80% (upper limit) in orange

7.4 Assign graphs to the device

  1. Navigation: Console → Management → Devices → Didactum device → Create Graphs for this Host.
  2. Select the desired graph templates (temperature, leakage, humidity, etc.).
  3. Click Create. Cacti automatically creates data sources and graphs.
  4. The graphs appear after the next polling cycle (max. 5 minutes) with the first data points.

7.5 Combine graphs in a dashboard

  1. Navigation: Console → Management → Graph Trees → Add.
  2. Name: Didactum Monitoring – Server Rooms
  3. Add tree items: Add Tree Item → Device → Didactum Rack Monitoring.
  4. All associated graphs are automatically grouped in the tree view.

8. OID reference for Cacti

8.1 Temperature Sensors

OIDDescriptionUnitRRD TypeCacti Note
1.3.6.1.4.1.3854.1.2.2.1.16.1.3.{n}Temperature value sensor n°C × 10GAUGECDEF ÷ 10 for correct display
1.3.6.1.4.1.3854.1.2.2.1.16.1.4.{n}Temperature status sensor nEnum 0/1/2GAUGEUse for Threshold plugin
1.3.6.1.4.1.3854.1.2.2.1.16.1.7.{n}Upper threshold sensor n°C × 10GAUGEDraw as HRULE in graphs
1.3.6.1.4.1.3854.1.2.2.1.16.1.8.{n}Lower threshold sensor n°C × 10GAUGEDraw as HRULE in graphs
1.3.6.1.4.1.3854.1.2.2.1.16.1.2.{n}Sensor name nTextFor data query index labeling

8.2 Leak Sensors

OIDDescriptionUnitRRD TypeCacti Note
1.3.6.1.4.1.3854.1.2.2.1.18.1.4.{n}Leak status sensor n0=OK, 1=LeakGAUGEAREA graph; threshold at 0.5
1.3.6.1.4.1.3854.1.2.2.1.18.1.3.{n}Leak value sensor n0=dryGAUGEAlternative to the status OID
1.3.6.1.4.1.3854.1.2.2.1.18.1.2.{n}Sensor name nTextFor labeling

8.3 Humidity Sensors

OIDDescriptionUnitRRD TypeCacti Note
1.3.6.1.4.1.3854.1.2.2.1.17.1.3.{n}Humidity value sensor n% RHGAUGENo factor needed
1.3.6.1.4.1.3854.1.2.2.1.17.1.4.{n}Humidity status nEnum 0/1/2GAUGEFor Threshold plugin
1.3.6.1.4.1.3854.1.2.2.1.17.1.7.{n}Upper threshold sensor n% RHGAUGEDraw as HRULE in graph
1.3.6.1.4.1.3854.1.2.2.1.17.1.8.{n}Lower threshold sensor n% RHGAUGEDraw as HRULE in graph

8.4 Additional Sensors

OIDDescriptionUnitRRD TypeCacti Note
1.3.6.1.4.1.3854.1.2.2.1.15.1.3.{n}Voltage value sensor nV × 10GAUGECDEF ÷ 10 for correct V display
1.3.6.1.4.1.3854.1.2.2.1.15.1.4.{n}Voltage status sensor nEnum 0/1/2GAUGEFor Threshold plugin
1.3.6.1.4.1.3854.1.2.2.1.10.1.3.{n}Door contact status n0=closed, 1=openGAUGEAREA graph, binary
1.3.6.1.4.1.3854.1.2.2.1.11.1.3.{n}Vibration / motion n0=none, 1=alarmGAUGEAREA graph, binary
1.3.6.1.4.1.3854.1.2.2.1.14.1.3.{n}Smoke detector status n0=OK, 1=AlarmGAUGEAREA graph, threshold immediately
1.3.6.1.2.1.1.3.0System Uptime (sysUpTime)Hundredths of secondsCOUNTERStandard SNMP OID

9. Threshold Plugin for Alerting

Cacti itself does not provide a native alarm function. 

The Thold plugin (Threshold) adds threshold monitoring and email notifications to Cacti.

9.1 Install the Thold plugin

# Download plugin (GitHub):
cd /usr/share/cacti/plugins/
sudo git clone [https://github.com/Cacti/plugin_thold.git](https://github.com/Cacti/plugin_thold.git) thold
sudo git clone [https://github.com/Cacti/plugin_settings.git](https://github.com/Cacti/plugin_settings.git) settings
 
# Set permissions:
sudo chown -R www-data:www-data /usr/share/cacti/plugins/thold
sudo chown -R www-data:www-data /usr/share/cacti/plugins/settings

Enable plugins in Cacti: Console → Configuration → Plugin Management → thold → Enable, settings → Enable.

9.2 Configure email notifications

  1. Navigation: Console → Configuration → Settings → Mail/DNS.
  2. Fill in the following fields:
    • Mail Services: SMTP
    • Mail Server: IP or hostname of the SMTP server
    • Mail Server Port: 25 or 587 (TLS)
    • Mail From: [cacti@example.com](mailto:cacti@example.com)
    • Mail From Name: Cacti Monitoring
  3. Send a test email: Send a Test Email.

9.3 Create a threshold for the temperature sensor

  1. Navigation: Console → Management → Thresholds → Add.
  2. Data Source: select Didactum Temperature Sensor 1.
  3. Settings:
    • Threshold Type: High / Low
    • High Warning: 300 (= 30 °C × 10)
    • High Alert: 350 (= 35 °C × 10)
    • Low Warning: 50 (= 5 °C × 10)
    • Low Alert: 0
    • Repeat Alert: 10 minutes
    • Notify: enter email address(es)
  4. Save and activate the threshold.

9.4 Threshold for leak sensor (immediate alarm)

  1. Create a new threshold, Data Source: Didactum Leak Sensor 1.
  2. Settings:
    • Threshold Type: High / Low
    • High Alert: 0.5 (alarm for any value above 0)
    • High Warning: leave blank (directly Critical)
    • Repeat Alert: 5 minutes
    • Notify: all relevant contacts

9.5 Recommended threshold settings

Sensor TypeHigh Warning (raw value)High Alert (raw value)Low WarningRepeat Interval
IT rack temperature (× 10)300 (30 °C)350 (35 °C)50 (5 °C)10 min
UPS room temperature (× 10)250 (25 °C)300 (30 °C)100 (10 °C)10 min
Humidity70802015 min
Leak0.55 min
Voltage 230 V AC (× 10)2530 (253 V)2600 (260 V)2070 (207 V)10 min
Door contact / smoke0.55 min

10. Troubleshooting

ProblemPossible cause / solution
Device shows “SNMP error" in the device statusCommunity string is incorrect or UDP port 161 is blocked. Test: run snmpwalk -v2c -c public 192.168.1.100 from the Cacti server.
Graphs remain empty / no data pointsPoller is not running. Check cron job: crontab -l -u www-data. Test poller manually: sudo -u www-data php /usr/share/cacti/poller.php.
Temperature is displayed incorrectly by a factor of 10 (235 instead of 23.5)Assign the CDEF “Divide by 10" to the graph template item (Console → Data Management → CDEFs). Alternatively, specify thresholds × 10.
OID returns “No Such Object"Sensor is not connected or the index is incorrect. Run snmpwalk -v2c -c public 192.168.1.100 1.3.6.1.4.1.3854.1.2.2.1.16.1.3 to determine the available indices.
Data Query finds no sensorsCheck the XML file for syntax errors. Run Queries again. Check the PHP error log: /var/log/apache2/error.log.
Thold plugin does not send emailsCheck SMTP settings (Console → Settings → Mail). Send a test email. PHP mail function enabled? sendmail installed on the server?
RRD file is not createdCheck write permissions: ls -la /var/lib/cacti/rra/. The directory must belong to the web server user (www-data).
Poller is running, but graphs show “NaN"The OID value is outside the configured RRD min/max limits. Edit the data source: set Minimum to 0, Maximum to U (unlimited).

Overview of Diagnostic Commands

# Test SNMP reachability:
snmpwalk -v2c -c public 192.168.1.100 1.3.6.1.4.1.3854
 
# Query a single sensor:
snmpget -v2c -c public 192.168.1.100 1.3.6.1.4.1.3854.1.2.2.1.16.1.3.1
 
# Run the poller manually (as the web server user):
sudo -u www-data php /usr/share/cacti/poller.php --force
 
# Run the poller with debug output:
sudo -u www-data php /usr/share/cacti/poller.php --force --debug
 
# Query the RRD file directly (show the last value):
rrdtool lastupdate /var/lib/cacti/rra/didactum_temperature_1.rrd
 
# Generate an RRD graph manually (test):
rrdtool graph /tmp/test.png \\
  --start -3600 \\
  DEF:temp=/var/lib/cacti/rra/didactum_temperature_1.rrd:temperature:AVERAGE \\
  LINE2:temp#FF0000:"Temperature"
 
# Check the Cacti log:
sudo tail -f /var/log/cacti/cacti.log
 
# Check write permissions for the RRD directory:
ls -la /var/lib/cacti/rra/
 
# Check PHP errors:
sudo tail -f /var/log/apache2/error.log

Appendix: Cacti Configuration Quick Reference

TaskCacti navigation path
Create deviceConsole → Management → Devices → Add
Create data sourceConsole → Management → Data Sources → Add
Create graph templateConsole → Templates → Graph Templates → Add
Create data templateConsole → Templates → Data Templates → Add
Create SNMP data queryConsole → Management → SNMP Queries → Add
Create graph for deviceConsole → Management → Devices → Device → Create Graphs
Create CDEF (calculation formula)Console → Data Management → CDEFs → Add
Create threshold (Thold plugin)Console → Management → Thresholds → Add
Email settingsConsole → Configuration → Settings → Mail/DNS
Poller settingsConsole → Configuration → Settings → Poller
Plugin managementConsole → Configuration → Plugin Management
Graph Tree (dashboard)Console → Management → Graph Trees → Add

Always consult the current Didactum device documentation for firmware-specific OIDs and supported sensor types.

This website uses cookies

This website uses cookies to improve user experience. By using our website you consent to all cookies in accordance with our Cookie Policy.

Essential cookies enable basic functions and are necessary for the website to function properly.
Statistics cookies collect information anonymously. This information helps us to understand how our visitors use our website.
Marketing cookies are used by third parties or publishers to display personalized advertisements. They do this by tracking visitors across websites.