Hello
I am testing LibreNMS and look great!
But I need some clarification regarding now ‘os’ that is not available, Eaton for DC Power Systems.
I did a new discovery script, to check this specific device, and some specific OIDs, like Current, Temperature and Voltage.
But once running the script to discovery, it gets the data this way:
_librenms@librenms:~$ ./discovery.php -h 192.168.0.180 -r -d -v -m sensors _
LibreNMS Discovery
Version info:
Commit SHA: 424ac80bff355ebcb503d1730928e06cdb70f7af
DB Schema: 159
PHP: 7.0.8-0ubuntu0.16.04.3
MySQL: 10.0.29-MariaDB-0ubuntu0.16.04.1
RRDTool: 1.5.5
SNMP: NET-SNMP 5.7.3
DEBUG!
_SQL[SELECT version FROM dbSchema
ORDER BY version DESC LIMIT 1] _
DB Schema already up to date.
_SQL[SELECT * FROM devices
WHERE status = 1 AND disabled = 0 AND hostname
LIKE ‘192.168.0.180’ ORDER BY device_id DESC] _
_SQL[SELECT * FROM devices_attribs WHERE device_id
= ‘40’] _
_192.168.0.180 40 eaton _
_Modules status: Global+ OS Device _
#### Load disco module sensors ####
Pre-cache: _
_ ENTITY-SENSOR: Caching OIDs: entPhysicalDescrSNMP[/usr/bin/snmpbulkwalk -v2c -c ‘public’ -OQUs -m CISCO-ENTITY-SENSOR-MIB -M /opt/librenms/mibs:/opt/librenms/mibs/eaton udp:192.168.0.180:161 entPhysicalDescr]
entPhysicalDescr = No Such Object available on this agent at this OID
_ entPhysicalNameSNMP[/usr/bin/snmpbulkwalk -v2c -c ‘public’ -OQUs -m CISCO-ENTITY-SENSOR-MIB -M /opt/librenms/mibs:/opt/librenms/mibs/eaton udp:192.168.0.180:161 entPhysicalName]_
entPhysicalName = No Such Object available on this agent at this OID
_ entPhySensorTypeSNMP[/usr/bin/snmpbulkwalk -v2c -c ‘public’ -OQUs -m ENTITY-SENSOR-MIB -M /opt/librenms/mibs:/opt/librenms/mibs/eaton udp:192.168.0.180:161 entPhySensorType]_
entPhySensorType = No Such Object available on this agent at this OID
_ entPhySensorScaleSNMP[/usr/bin/snmpbulkwalk -v2c -c ‘public’ -OQUs -m ENTITY-SENSOR-MIB -M /opt/librenms/mibs:/opt/librenms/mibs/eaton udp:192.168.0.180:161 entPhySensorScale]_
entPhySensorScale = No Such Object available on this agent at this OID
_ entPhySensorPrecisionSNMP[/usr/bin/snmpbulkwalk -v2c -c ‘public’ -OQUs -m ENTITY-SENSOR-MIB -M /opt/librenms/mibs:/opt/librenms/mibs/eaton udp:192.168.0.180:161 entPhySensorPrecision]_
entPhySensorPrecision = No Such Object available on this agent at this OID
_ entPhySensorValueSNMP[/usr/bin/snmpbulkwalk -v2c -c ‘public’ -OQUs -m ENTITY-SENSOR-MIB -M /opt/librenms/mibs:/opt/librenms/mibs/eaton udp:192.168.0.180:161 entPhySensorValue]_
entPhySensorValue = No Such Object available on this agent at this OID
_SQL[SELECT attrib_value FROM devices_attribs WHERE device_id
= ‘40’ AND attrib_type
= ‘ipmi_hostname’ ] _
_SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=‘voltage’ AND S.device_id = D.device_id AND D.device_id = ‘40’ AND S.poller_type = ‘ipmi’] _
_SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=‘temperature’ AND S.device_id = D.device_id AND D.device_id = ‘40’ AND S.poller_type = ‘ipmi’] _
_SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=‘fanspeed’ AND S.device_id = D.device_id AND D.device_id = ‘40’ AND S.poller_type = ‘ipmi’] _
_SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=‘power’ AND S.device_id = D.device_id AND D.device_id = ‘40’ AND S.poller_type = ‘ipmi’] _
_Airflow: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=‘airflow’ AND S.device_id = D.device_id AND D.device_id = ‘40’ AND S.poller_type = ‘snmp’] _
Current: Eaton Power Current SNMP[/usr/bin/snmpget -v2c -c ‘public’ -Oqv -M /opt/librenms/mibs:/opt/librenms/mibs/eaton udp:192.168.0.180:161 1.3.6.1.4.1.1918.2.13.10.50.10.0]
36
_Discover sensor: 1.3.6.1.4.1.1918.2.13.10.50.10.0, 0, eaton, Eaton Power Current , snmp, , _
_SQL[SELECT COUNT(sensor_id) FROM sensors
WHERE poller_type
= ‘snmp’ AND sensor_class
= ‘current’ AND device_id
= ‘40’ AND sensor_type = ‘eaton’ AND sensor_index
= ‘0’] _
_SQL[SELECT * FROM sensors
WHERE sensor_class
= ‘current’ AND device_id
= ‘40’ AND sensor_type
= ‘eaton’ AND sensor_index
= ‘0’] _
_SQL[UPDATE sensors
set sensor_oid
=‘1.3.6.1.4.1.1918.2.13.10.50.10.0’,sensor_descr
=‘Eaton Power Current ‘,sensor_multiplier
=‘1’,sensor_divisor
=‘1’,entPhysicalIndex
=’’,entPhysicalIndex_measured
=’’ WHERE sensor_id
= ‘53’] _
_USQL[INSERT INTO eventlog
(host
,device_id
,reference
,type
,datetime
,message
) VALUES (‘40’,‘40’,‘NULL’,‘sensor’,NOW(),'Sensor Updated: current eaton 0 Eaton Power Current ')] _
( 1 updated )
_SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=‘eaton’ AND S.device_id = D.device_id AND D.device_id = ‘40’ AND S.poller_type = ‘snmp’] _
_Charge: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=‘charge’ AND S.device_id = D.device_id AND D.device_id = ‘40’ AND S.poller_type = ‘snmp’] _
_Dbm: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=‘dbm’ AND S.device_id = D.device_id AND D.device_id = ‘40’ AND S.poller_type = ‘snmp’] _
_Fanspeeds: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=‘fanspeeds’ AND S.device_id = D.device_id AND D.device_id = ‘40’ AND S.poller_type = ‘snmp’] _
_Frequencies: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=‘frequencies’ AND S.device_id = D.device_id AND D.device_id = ‘40’ AND S.poller_type = ‘snmp’] _
_Humidity: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=‘humidity’ AND S.device_id = D.device_id AND D.device_id = ‘40’ AND S.poller_type = ‘snmp’] _
_Load: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=‘load’ AND S.device_id = D.device_id AND D.device_id = ‘40’ AND S.poller_type = ‘snmp’] _
_Power: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=‘power’ AND S.device_id = D.device_id AND D.device_id = ‘40’ AND S.poller_type = ‘snmp’] _
_Runtime: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=‘runtime’ AND S.device_id = D.device_id AND D.device_id = ‘40’ AND S.poller_type = ‘snmp’] _
_Signal: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=‘signal’ AND S.device_id = D.device_id AND D.device_id = ‘40’ AND S.poller_type = ‘snmp’] _
_States: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=‘states’ AND S.device_id = D.device_id AND D.device_id = ‘40’ AND S.poller_type = ‘snmp’] _
Temperatures: EATON Power SNMP[/usr/bin/snmpget -v2c -c ‘public’ -Oqv -M /opt/librenms/mibs:/opt/librenms/mibs/eaton udp:192.168.0.180:161 1.3.6.1.4.1.1918.2.13.10.90.10.30.1.40.9]
2450
_SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=‘temperatures’ AND S.device_id = D.device_id AND D.device_id = ‘40’ AND S.poller_type = ‘snmp’] _
Voltages: SNMP[/usr/bin/snmpget -v2c -c ‘public’ -Oqv -M /opt/librenms/mibs:/opt/librenms/mibs/eaton udp:192.168.0.180:161 .1.3.6.1.4.1.1918.2.13.10.90.10.30.1.40.1]
5388
_Discover sensor: .1.3.6.1.4.1.1918.2.13.10.90.10.30.1.40.1, 0, eaton, Tension de Bateria, snmp, , _
_SQL[SELECT COUNT(sensor_id) FROM sensors
WHERE poller_type
= ‘snmp’ AND sensor_class
= ‘voltage’ AND device_id
= ‘40’ AND sensor_type = ‘eaton’ AND sensor_index
= ‘0’] _
_SQL[SELECT * FROM sensors
WHERE sensor_class
= ‘voltage’ AND device_id
= ‘40’ AND sensor_type
= ‘eaton’ AND sensor_index
= ‘0’] _
_.SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=‘eaton’ AND S.device_id = D.device_id AND D.device_id = ‘40’ AND S.poller_type = ‘snmp’] _
>> Runtime for discovery module ‘sensors’: 3.4720 seconds
#### Unload disco module sensors ####
Meanwhile, in poller:
root@librenms:/opt/librenms# ./poller.php -h 192.168.0.180 -m sensors -d
LibreNMS Poller
Version info:
Commit SHA: 424ac80bff355ebcb503d1730928e06cdb70f7af
Commit Date: 1486156879
DB Schema: 159
PHP: 7.0.8-0ubuntu0.16.04.3
MySQL: 10.0.29-MariaDB-0ubuntu0.16.04.1
RRDTool: 1.5.5
SNMP: NET-SNMP 5.7.3
DEBUG!
Starting polling run:
_SQL[SELECT * FROM devices
WHERE disabled
= 0 AND hostname
= ‘192.168.0.180’ ORDER BY device_id
ASC] _
_SQL[SELECT * FROM devices_attribs WHERE device_id
= ‘40’] _
Hostname: 192.168.0.180
Device ID: 40
OS: eaton
_SQL[INSERT INTO device_perf
(xmt
,rcv
,loss
,min
,max
,avg
,device_id
,timestamp
) VALUES (‘3’,‘3’,‘0’,‘4.90’,‘37.4’,‘17.9’,‘40’,NOW())] _
SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -Oqv -m SNMPv2-MIB -M /opt/librenms/mibs:/opt/librenms/mibs/eaton udp:HOSTNAME:161 sysObjectID.0]
SNMPv2-SMI::enterprises.1918.2.13
SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -OQnUst -m SNMPv2-MIB:HOST-RESOURCES-MIB:SNMP-FRAMEWORK-MIB -M /opt/librenms/mibs:/opt/librenms/mibs/eaton udp:HOSTNAME:161 sysUpTime.0 sysLocation.0 sysContact.0 sysName.0 sysObjectID.0]
sysUpTime.0 = 1126449316
sysLocation.0 = Mar de Las Pampas
sysContact.0 = A Gallo - N Barros - 2255461600
sysName.0 = MdlP
sysObjectID.0 = enterprises.1918.2.13
SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -OvQ -m SNMPv2-MIB:HOST-RESOURCES-MIB:SNMP-FRAMEWORK-MIB -M /opt/librenms/mibs:/opt/librenms/mibs/eaton udp:HOSTNAME:161 sysDescr.0]
SC200 Controller - software version 4.04
SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -OQnUst -m HOST-RESOURCES-MIB:SNMP-FRAMEWORK-MIB -M /opt/librenms/mibs:/opt/librenms/mibs/eaton udp:HOSTNAME:161 snmpEngineTime.0 hrSystemUptime.0]
snmpEngineTime.0 = 11264494
hrSystemUptime.0 = No Such Object available on this agent at this OID
Using SNMP Agent Uptime (11264493s)
_ hrSystemUptime or sysUpTime looks like to have rolled, using snmpEngineTime insteadRRD[update 192.168.0.180/uptime.rrd N:11264494 --daemon unix:/var/run/rrdcached.sock]_
Uptime: 130 days, 9h 1m 34s
_SQL[SELECT lat
,lng
FROM locations
WHERE location
=‘Mar de Las Pampas’ LIMIT 1] _
Using cached lat/lng from other device
_Modules status: Global+ OS Device _
#### Load poller module sensors ####
_SQL[SELECT * FROM sensors
WHERE sensor_class
= ‘current’ AND device_id
= ‘40’] _
SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -OUQnt -M /opt/librenms/mibs:/opt/librenms/mibs/eaton udp:HOSTNAME:161 1.3.6.1.4.1.1918.2.13.10.50.10.0]
..4.1.19.50.10.0 = 36
_Checking (snmp) current Eaton Power Current … _
0 A
RRD[update 192.168.0.180/sensor-current-eaton-0.rrd N:0 --daemon unix:/var/run/rrdcached.sock]
_SQL[UPDATE sensors
set sensor_current
=‘0’,sensor_prev
=‘0’,lastupdate
=NOW() WHERE sensor_class
= ‘current’ AND sensor_id
= ‘53’] _
_SQL[SELECT * FROM sensors
WHERE sensor_class
= ‘frequency’ AND device_id
= ‘40’] _
_SQL[SELECT * FROM sensors
WHERE sensor_class
= ‘runtime’ AND device_id
= ‘40’] _
_SQL[SELECT * FROM sensors
WHERE sensor_class
= ‘humidity’ AND device_id
= ‘40’] _
_SQL[SELECT * FROM sensors
WHERE sensor_class
= ‘fanspeed’ AND device_id
= ‘40’] _
_SQL[SELECT * FROM sensors
WHERE sensor_class
= ‘power’ AND device_id
= ‘40’] _
_SQL[SELECT * FROM sensors
WHERE sensor_class
= ‘voltage’ AND device_id
= ‘40’] _
SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -OUQnt -M /opt/librenms/mibs:/opt/librenms/mibs/eaton udp:HOSTNAME:161 .1.3.6.1.4.1.1918.2.13.10.90.10.30.1.40.1]
..4.1.19.*.40.1 = 5388
_Checking (snmp) voltage Tension de Bateria… _
53.88 V
RRD[update 192.168.0.180/sensor-voltage-eaton-0.rrd N:53.88 --daemon unix:/var/run/rrdcached.sock]
_SQL[UPDATE sensors
set sensor_current
=‘53.88’,sensor_prev
=‘53.88’,lastupdate
=NOW() WHERE sensor_class
= ‘voltage’ AND sensor_id
= ‘38’] _
_SQL[SELECT * FROM sensors
WHERE sensor_class
= ‘temperature’ AND device_id
= ‘40’] _
SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -OUQnt -M /opt/librenms/mibs:/opt/librenms/mibs/eaton udp:HOSTNAME:161 1.3.6.1.4.1.1918.2.13.10.100.30.0]
..4.1.19.100.30.0 = 25
_Checking (snmp) temperature Battery Temperature… _
0 C
RRD[update 192.168.0.180/sensor-temperature-eaton-1.rrd N:0 --daemon unix:/var/run/rrdcached.sock]
_SQL[UPDATE sensors
set sensor_current
=‘0’,sensor_prev
=‘0’,lastupdate
=NOW() WHERE sensor_class
= ‘temperature’ AND sensor_id
= ‘37’] _
_SQL[SELECT * FROM sensors
WHERE sensor_class
= ‘dbm’ AND device_id
= ‘40’] _
_SQL[SELECT * FROM sensors
WHERE sensor_class
= ‘charge’ AND device_id
= ‘40’] _
_SQL[SELECT * FROM sensors
WHERE sensor_class
= ‘load’ AND device_id
= ‘40’] _
_SQL[SELECT * FROM sensors
WHERE sensor_class
= ‘state’ AND device_id
= ‘40’] _
_SQL[SELECT * FROM sensors
WHERE sensor_class
= ‘signal’ AND device_id
= ‘40’] _
_SQL[SELECT * FROM sensors
WHERE sensor_class
= ‘airflow’ AND device_id
= ‘40’] _
>> Runtime for poller module ‘sensors’: 0.3862 seconds
#### Unload poller module sensors ####
RRD[update 192.168.0.180/poller-perf-sensors.rrd N:0.38622879981995 --daemon unix:/var/run/rrdcached.sock]
### Start Device Groups ###
As you can see, the data read form poller ( temperature ) is in other OID than in Discovery.
Besides, although poller gets in Current for example 36, wrote to databes 0 A!!!
Same for Tempeature.
Any help will be appreciated
Regards
Andres.-