Skip to content

Instantly share code, notes, and snippets.

@kyob
Created February 21, 2017 12:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kyob/7704ec639b65a90e7a4b4d06019e5b19 to your computer and use it in GitHub Desktop.
Save kyob/7704ec639b65a90e7a4b4d06019e5b19 to your computer and use it in GitHub Desktop.
LibreNMS Discovery
Version info:
Commit SHA: ca2662fead1a54ba4f3879863bdb7ced7168016b
DB Schema: 165
PHP: 7.0.15
MySQL: 5.5.52-MariaDB
RRDTool: 1.4.8
SNMP: NET-SNMP 5.7.2
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 '10.10.10.10' ORDER BY device_id DESC]
SQL[SELECT * FROM devices_attribs WHERE `device_id` = '197']
10.10.10.10 197 seos SQL[INSERT INTO `device_perf` (`xmt`,`rcv`,`loss`,`min`,`max`,`avg`,`device_id`,`timestamp`) VALUES ('3','3','0','0.29','0.43','0.37','197',NOW())]
SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -Oqv -m SNMPv2-MIB -M /opt/librenms/mibs udp:HOSTNAME:161 sysObjectID.0]
SNMPv2-SMI::enterprises.2352.1.15
Modules status: Global+ OS Device
#### Load disco module processors ####
hrDevice: SNMP[/usr/bin/snmpbulkwalk -v2c -c COMMUNITY -OQUs -m HOST-RESOURCES-MIB:HOST-RESOURCES-TYPES -M /opt/librenms/mibs:/opt/librenms/mibs/ericsson udp:HOSTNAME:161 hrDevice]
hrDevice = No Such Object available on this agent at this OID
SNMP[/usr/bin/snmpbulkwalk -v2c -c COMMUNITY -OQUs -m HOST-RESOURCES-MIB:HOST-RESOURCES-TYPES -M /opt/librenms/mibs:/opt/librenms/mibs/ericsson udp:HOSTNAME:161 hrProcessorLoad]
hrProcessorLoad = No Such Object available on this agent at this OID
Redback SEOS : SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -Ovqn -M /opt/librenms/mibs:/opt/librenms/mibs/ericsson udp:HOSTNAME:161 .1.3.6.1.4.1.2352.2.6.1.1]
No Such Instance currently exists at this OID
SQL[SELECT COUNT(*) FROM `processors` WHERE `device_id` = '197' AND `processor_type` != 'ucd-old']
SQL[SELECT * FROM `processors` WHERE `device_id` = '197']
>> Runtime for discovery module 'processors': 0.1220 seconds with 34352 bytes
#### Unload disco module processors ####
SQL[SELECT attrib_value FROM devices_attribs WHERE `device_id` = '197' AND `attrib_type` = 'poll_mib' ]
SQL[SELECT attrib_value FROM devices_attribs WHERE `device_id` = '197' AND `attrib_type` = 'poll_mib' ]
MIB: registering
SNMP[snmptranslate -M /opt/librenms/mibs:/opt/librenms/mibs/ericsson -IR -m all enterprises.2352.1.15 2>/dev/null]
RBN-SMI::rbnProducts.15
SNMP translated: all::enterprises.2352.1.15 -> RBN-SMI::rbnProducts.15
RBN-SMI::rbnProducts.15
Array
(
)
MIB: Could not load definition for RBN-SMI::rbnProducts.15
SQL[UPDATE `devices` set `last_discovered` =NOW(),`last_discovered_timetaken` ='1.133' WHERE `device_id` = '197']
Discovered in 1.133 seconds
SQL[INSERT INTO `perf_times` (`type`,`doing`,`start`,`duration`,`devices`,`poller`) VALUES ('discover','10.10.10.10','1487679323.0219','1.164','1','LIBRENMS\n')]
./discovery.php 10.10.10.10 2017-02-21 13:15:24 - 1 devices discovered in 1.164 secs
SNMP: Get[2/0.04s] Walk [2/0.10s]
MySQL: Cell[4/0.00s] Row[2/0.00s] Rows[5/0.00s] Column[0/0.00s] Update[1/0.00s] Insert[2/0.00s] Delete[0/0.00s]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment