Metasystem - Legrand UPS Issue

Hi,
I’m monitoring two Metasystem DK3000 and a Legrand DK3000 (CS121 adapter card). Librenms was able to recognise both devices and print some graphs. I’d like to modify the device page in order to add:

  • Input Voltage data collect and graph;
  • output current data collect and graph.

Is there a simple way to do this? I checked the rfc1628 files and noticed that the OIDs are correct, but are not shown.

Using Version 1.37-20-g84b0b32bd

thank you.

I don’t know what OS they are but if you do, edit includes/definitions/$os.yaml and add:

rfc1628_compat: 1 before the over: section.

Thank you for prompt reply.
The OS type is generex-ups and it already has the rfc1628_compat: 1 in its definition. Just above the discovery module statement.

Then I guess they aren’t fully using rfc1628.

Pastebin the output of ./discovery.php -h HOSTNAME -d -m sensors

Sorry for late answer:

./discovery.php -h 192.168.81.206 -d -m sensors
LibreNMS Discovery
SQL[select migration from migrations order by id desc limit 1 0.44ms]
SQL[select count(*) as aggregate from migrations limit 1 0.52ms]
SQL[SELECT version() 0.14ms]

Version info:
Commit SHA: a6f88f6e2fb23510224c7f197f5e3a0539121824
Commit Date: 1549926934
DB Schema: 2019_01_16_195644_add_vrf_id_and_bgpLocalAs (131)
PHP: 7.2.15-1+0~20190209065123.16+stretch~1.gbp3ad8c0
MySQL: 10.1.26-MariaDB-0+deb9u1
RRDTool: 1.6.0
SNMP: NET-SNMP 5.7.3
==================================DEBUG!
Updating os_def.cache… Done
Override discovery modules: sensors
SQL[SELECT * FROM devices WHERE disabled = 0 AND snmp_disable = 0 AND hostname LIKE ‘192.168.81.206’ ORDER BY device_id DESC 0.79ms]
SQL[SELECT * FROM devices_attribs WHERE device_id = ? [10] 0.38ms]
192.168.81.206 10 generic [FPING] /usr/bin/fping -e -q -c 3 -p 500 -t 500 192.168.81.206
Array
(
[xmt] => 3
[rcv] => 3
[loss] => 0
[min] => 1.66
[max] => 4.58
[avg] => 2.69
[exitcode] => 0
)
SQL[INSERT IGNORE INTO device_perf (xmt,rcv,loss,min,max,avg,device_id,timestamp,debug) VALUES (:xmt,:rcv,:loss,:min,:max,:avg,:device_id,NOW(),:debug) {“xmt”:“3”,“rcv”:“3”,“loss”:“0”,“min”:“1.66”,“max”:“4.58”,“avg”:“2.69”,“device_id”:10,“debug”:“”} 32.45ms]
SNMP Check response code: 0
SNMP[‘/usr/bin/snmpget’ ‘-v2c’ ‘-c’ ‘COMMUNITY’ ‘-Ovq’ ‘-M’ ‘/opt/librenms/mibs’ ‘udp:HOSTNAME:161’ ‘SNMPv2-MIB::sysDescr.0’]
CS121 v 4.28.18

SNMP[‘/usr/bin/snmpget’ ‘-v2c’ ‘-c’ ‘COMMUNITY’ ‘-Ovqn’ ‘-M’ ‘/opt/librenms/mibs’ ‘udp:HOSTNAME:161’ ‘SNMPv2-MIB::sysObjectID.0’]
.*.2.1.33

| CS121 v 4.28.18 | .1.3.6.1.2.1.33 |
SNMP[‘/usr/bin/snmpget’ ‘-v2c’ ‘-c’ ‘COMMUNITY’ ‘-Oqv’ ‘-M’ ‘/opt/librenms/mibs’ ‘udp:HOSTNAME:161’ ‘.1.3.6.1.4.1.12148.10.2.6.0’]

Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: iso.3.6.1.4.1.12148.10.2.6.0

SQL[SELECT attrib_value FROM devices_attribs WHERE device_id = ? AND attrib_type = ? [10,“poll_mib”] 0.76ms]
Attempting to initialize OS: generic
OS initialized: LibreNMS\OS\Generic

Modules status: Global+ OS Device

Load disco module core

SNMP[‘/usr/bin/snmpget’ ‘-v2c’ ‘-c’ ‘COMMUNITY’ ‘-OUQn’ ‘-m’ ‘SNMPv2-MIB’ ‘-M’ ‘/opt/librenms/mibs’ ‘udp:HOSTNAME:161’ ‘sysName.0’ ‘sysObjectID.0’ ‘sysDescr.0’]
...0 = DK3000_02_RC
...0 = ..2.1.33
.
.*.0 = CS121 v 4.28.18

Runtime for discovery module ‘core’: 0.0120 seconds with 968 bytes
SNMP: [5/0.06s] MySQL: [4/0.04s] RRD: [0/0.00s]

Unload disco module core

Modules status: Global+ OS+ Device

Load disco module sensors

ENTITY-SENSOR: Caching OIDs: entPhysicalDescrSNMP[‘/usr/bin/snmpbulkwalk’ ‘-v2c’ ‘-c’ ‘COMMUNITY’ ‘-OQUs’ ‘-m’ ‘ENTITY-MIB’ ‘-M’ ‘/opt/librenms/mibs’ ‘udp:HOSTNAME:161’ ‘entPhysicalDescr’]
entPhysicalDescr = No more variables left in this MIB View (It is past the end of the MIB tree)

SQL[SELECT attrib_value FROM devices_attribs WHERE device_id = ? AND attrib_type = ? [10,“ipmi_hostname”] 0.47ms]
SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ? [“voltage”,10,“ipmi”] 48.87ms]
SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ? [“temperature”,10,“ipmi”] 0.53ms]
SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ? [“fanspeed”,10,“ipmi”] 0.46ms]
SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ? [“power”,10,“ipmi”] 0.41ms]
Airflow: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ? [“airflow”,10,“snmp”] 0.43ms]

Current: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ? [“current”,10,“snmp”] 0.43ms]

Charge: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ? [“charge”,10,“snmp”] 0.45ms]

Dbm: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ? [“dbm”,10,“snmp”] 0.42ms]

Fanspeed: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ? [“fanspeed”,10,“snmp”] 0.42ms]

Frequency: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ? [“frequency”,10,“snmp”] 0.6ms]

Humidity: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ? [“humidity”,10,“snmp”] 0.6ms]

Load: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ? [“load”,10,“snmp”] 0.57ms]

Power: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ? [“power”,10,“snmp”] 0.6ms]

Power_consumed: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ? [“power_consumed”,10,“snmp”] 0.59ms]

Power_factor: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ? [“power_factor”,10,“snmp”] 0.59ms]

Runtime: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ? [“runtime”,10,“snmp”] 0.62ms]

Signal: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ? [“signal”,10,“snmp”] 0.68ms]

State: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ? [“state”,10,“snmp”] 0.58ms]

Count: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ? [“count”,10,“snmp”] 0.56ms]

Temperature: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ? [“temperature”,10,“snmp”] 0.57ms]

Voltage: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ? [“voltage”,10,“snmp”] 0.6ms]

Snr: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ? [“snr”,10,“snmp”] 0.56ms]

Pressure: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ? [“pressure”,10,“snmp”] 0.56ms]

Cooling: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ? [“cooling”,10,“snmp”] 0.57ms]

Delay: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ? [“delay”,10,“snmp”] 0.59ms]

Quality_factor: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ? [“quality_factor”,10,“snmp”] 0.61ms]

Chromatic_dispersion: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ? [“chromatic_dispersion”,10,“snmp”] 0.59ms]

Ber: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ? [“ber”,10,“snmp”] 0.61ms]

Eer: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ? [“eer”,10,“snmp”] 0.58ms]

Waterflow: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ? [“waterflow”,10,“snmp”] 0.39ms]

Runtime for discovery module ‘sensors’: 0.1110 seconds with 44528 bytes
SNMP: [1/0.03s] MySQL: [31/0.07s] RRD: [0/0.00s]

Unload disco module sensors

SQL[SELECT attrib_value FROM devices_attribs WHERE device_id = ? AND attrib_type = ? [10,“poll_mib”] 0.37ms]
SQL[UPDATE devices set last_discovered=NOW(),last_discovered_timetaken=? WHERE device_id = ? [1.352,10] 32.3ms]
Discovered in 1.352 seconds

SQL[INSERT IGNORE INTO perf_times (type,doing,start,duration,devices,poller) VALUES (:type,:doing,:start,:duration,:devices,:poller) {“type”:“discover”,“doing”:“192.168.81.206”,“start”:1550134888.953817,“duration”:“1.545”,“devices”:1,“poller”:“intranet”} 33.39ms]
./discovery.php 192.168.81.206 2019-02-14 10:01:30 - 1 devices discovered in 1.545 secs
SNMP [6/0.09s]: Get[5/0.06s] Getnext[0/0.00s] Walk[1/0.03s]
MySQL [38/0.18s]: Cell[1/0.00s] Row[2/0.00s] Rows[32/0.07s] Column[0/0.00s] Update[1/0.03s] Insert[2/0.07s] Delete[0/0.00s]
RRD [0/0.00s]: Update[0/0.00s] Create [0/0.00s] Other[0/0.00s]