Hello,
I am trying to configure alerts for a Mikrotik RB1100Dx4 - with dual PSU. Since mikrotik does not have OIDs for status, I decided to monitor the voltage of each PSU, if it drops below 20V, send an alert.
Miktorik terminal:
4 psu1-voltage 24.4 V
5 psu2-voltage 24.3 V
4 name=.1.3.6.1.4.1.14988.1.1.3.100.1.2.7201
value=.1.3.6.1.4.1.14988.1.1.3.100.1.3.7201 <- "added this to libreNMS for custom oid"
type=.1.3.6.1.4.1.14988.1.1.3.100.1.4.7201
5 name=.1.3.6.1.4.1.14988.1.1.3.100.1.2.7202
value=.1.3.6.1.4.1.14988.1.1.3.100.1.3.7202 <- "added this to libreNMS for custom oid"
type=.1.3.6.1.4.1.14988.1.1.3.100.1.4.7202
snmpwalk output:
iso.3.6.1.4.1.14988.1.1.3.100.1.2.7201 = STRING: “psu1-voltage”
iso.3.6.1.4.1.14988.1.1.3.100.1.2.7202 = STRING: “psu2-voltage”
iso.3.6.1.4.1.14988.1.1.3.100.1.3.7201 = Gauge32: 245
iso.3.6.1.4.1.14988.1.1.3.100.1.3.7202 = Gauge32: 243
iso.3.6.1.4.1.14988.1.1.3.100.1.4.7201 = INTEGER: 3
iso.3.6.1.4.1.14988.1.1.3.100.1.4.7202 = INTEGER: 3
It works fine under Custom OIDs, I can see the graphs. But the alerting does not work.
After searchnig a bit I found this: Alert on Custom OID - #2 by murrant and followed this: Health Information - LibreNMS Docs
I added this to /opt/librenms/includes/definitions/discovery/routeros.yaml
voltage:
data:
--- other default values here ----
-
oid: psu1-voltage
value: voltage
num_oid: '.1.3.6.1.4.1.14988.1.1.3.100.1.3.7201'
divisor: 10
descr: 'PSU1 Voltage'
-
oid: psu2-voltage
value: voltage
num_oid: '.1.3.6.1.4.1.14988.1.1.3.100.1.3.7202'
divisor: 10
descr: 'PSU2 Voltage'
After triggering a “rediscover device” nothing changes. I assume I did not configure this correctly.
Any help or hint appreciated.