Skip to content

Instantly share code, notes, and snippets.

@kyob
Created March 2, 2017 10:44
Show Gist options
  • Save kyob/fade808d2220abd9ad1f08c63cd7f125 to your computer and use it in GitHub Desktop.
Save kyob/fade808d2220abd9ad1f08c63cd7f125 to your computer and use it in GitHub Desktop.
LibreNMS Discovery
Version info:
Commit SHA: 46198b2caa30e4e7a2848da6aa94256e9bff77e6
DB Schema: 172
PHP: 7.0.16
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.100.0.54' ORDER BY device_id DESC]
SQL[SELECT * FROM devices_attribs WHERE `device_id` = '366']
10.100.0.54 366 generic SQL[INSERT INTO `device_perf` (`xmt`,`rcv`,`loss`,`min`,`max`,`avg`,`device_id`,`timestamp`) VALUES ('3','3','0','0.96','1.07','1.00','366',NOW())]
SNMP Check response code: 0
SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -Ovq -M /opt/librenms/mibs udp:HOSTNAME:161 SNMPv2-MIB::sysDescr.0]
SGS-6340-16XR Device, Compiled Mar 29 09:39:29 2016
SoftWare Version *(R0006.0031)
BootRom Version 7.4.5
HardWare Version 1.0.1
SoftWare Version *(R0006.0031)
BootRom Version 7.4.5
HardWare Version 1.0.1
SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -Ovqn -M /opt/librenms/mibs udp:HOSTNAME:161 SNMPv2-MIB::sysObjectID.0]
.*.4.1.10456.1.1566
| SGS-6340-16XR Device, Compiled Mar 29 09:39:29 2016
SoftWare Version 7.4.3.0(R0006.0031)
BootRom Version 7.4.5
HardWare Version 1.0.1
SoftWare Version 7.4.3.0(R0006.0031)
BootRom Version 7.4.5
HardWare Version 1.0.1 | .1.3.6.1.4.1.10456.1.1566 |
SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -Oqvn -M /opt/librenms/mibs udp:HOSTNAME:161 ENTITY-MIB::entPhysicalDescr.1]
PLANET Technology Corporation chassis model SGS-6340-16XR
SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -Oqv -M /opt/librenms/mibs udp:HOSTNAME:161 SML-MIB::product-Name.0]
No Such Object available on this agent at this OID
SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -Osqnv -M /opt/librenms/mibs udp:HOSTNAME:161 ENTITY-MIB::entPhysicalMfgName.1]
PLANET Technology Corporation
Modules status: Global+ OS Device
#### Load disco module os ####
SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -Ovq -M /opt/librenms/mibs udp:HOSTNAME:161 SNMPv2-MIB::sysDescr.0]
SGS-6340-16XR Device, Compiled Mar 29 09:39:29 2016
SoftWare Version *(R0006.0031)
BootRom Version 7.4.5
HardWare Version 1.0.1
SoftWare Version *(R0006.0031)
BootRom Version 7.4.5
HardWare Version 1.0.1
SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -Ovqn -M /opt/librenms/mibs udp:HOSTNAME:161 SNMPv2-MIB::sysObjectID.0]
.*.4.1.10456.1.1566
| SGS-6340-16XR Device, Compiled Mar 29 09:39:29 2016
SoftWare Version 7.4.3.0(R0006.0031)
BootRom Version 7.4.5
HardWare Version 1.0.1
SoftWare Version 7.4.3.0(R0006.0031)
BootRom Version 7.4.5
HardWare Version 1.0.1 | .1.3.6.1.4.1.10456.1.1566 |
SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -Oqvn -M /opt/librenms/mibs udp:HOSTNAME:161 ENTITY-MIB::entPhysicalDescr.1]
PLANET Technology Corporation chassis model SGS-6340-16XR
SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -Oqv -M /opt/librenms/mibs udp:HOSTNAME:161 SML-MIB::product-Name.0]
No Such Object available on this agent at this OID
SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -Osqnv -M /opt/librenms/mibs udp:HOSTNAME:161 ENTITY-MIB::entPhysicalMfgName.1]
PLANET Technology Corporation
>> Runtime for discovery module 'os': 0.2600 seconds with 1208 bytes
#### Unload disco module os ####
Modules status: Global+ OS Device
#### Load disco module ports ####
SNMP[/usr/bin/snmpbulkwalk -v2c -c COMMUNITY -OQUs -m IF-MIB -M /opt/librenms/mibs udp:HOSTNAME:161 ifDescr]
ifDescr.1 = Ethernet1/0/1
ifDescr.2 = Ethernet1/0/2
ifDescr.3 = Ethernet1/0/3
ifDescr.4 = Ethernet1/0/4
ifDescr.5 = Ethernet1/0/5
ifDescr.6 = Ethernet1/0/6
ifDescr.7 = Ethernet1/0/7
ifDescr.8 = Ethernet1/0/8
ifDescr.9 = Ethernet1/0/9
ifDescr.10 = Ethernet1/0/10
ifDescr.11 = Ethernet1/0/11
ifDescr.12 = Ethernet1/0/12
ifDescr.13 = Ethernet1/0/13
ifDescr.14 = Ethernet1/0/14
ifDescr.15 = Ethernet1/0/15
ifDescr.16 = Ethernet1/0/16
ifDescr.11001 = Vlan1
ifDescr.11100 = Vlan100
SNMP[/usr/bin/snmpbulkwalk -v2c -c COMMUNITY -OQUs -m IF-MIB -M /opt/librenms/mibs udp:HOSTNAME:161 ifName]
ifName.1 = Ethernet1/0/1
ifName.2 = Ethernet1/0/2
ifName.3 = Ethernet1/0/3
ifName.4 = Ethernet1/0/4
ifName.5 = Ethernet1/0/5
ifName.6 = Ethernet1/0/6
ifName.7 = Ethernet1/0/7
ifName.8 = Ethernet1/0/8
ifName.9 = Ethernet1/0/9
ifName.10 = Ethernet1/0/10
ifName.11 = Ethernet1/0/11
ifName.12 = Ethernet1/0/12
ifName.13 = Ethernet1/0/13
ifName.14 = Ethernet1/0/14
ifName.15 = Ethernet1/0/15
ifName.16 = Ethernet1/0/16
ifName.11001 = Vlan1
ifName.11100 = Vlan100
SNMP[/usr/bin/snmpbulkwalk -v2c -c COMMUNITY -OQUs -m IF-MIB -M /opt/librenms/mibs udp:HOSTNAME:161 ifAlias]
ifAlias.1 = do serwis * port 23
ifAlias.2 = do dlink 10g access * port 24
ifAlias.3 =
ifAlias.4 =
ifAlias.5 =
ifAlias.6 =
ifAlias.7 =
ifAlias.8 =
ifAlias.9 =
ifAlias.10 =
ifAlias.11 =
ifAlias.12 =
ifAlias.13 =
ifAlias.14 =
ifAlias.15 =
ifAlias.16 =
ifAlias.11001 =
ifAlias.11100 =
SNMP[/usr/bin/snmpbulkwalk -v2c -c COMMUNITY -OQUs -m IF-MIB -M /opt/librenms/mibs udp:HOSTNAME:161 ifType]
ifType.1 = ethernetCsmacd
ifType.2 = ethernetCsmacd
ifType.3 = ethernetCsmacd
ifType.4 = ethernetCsmacd
ifType.5 = ethernetCsmacd
ifType.6 = ethernetCsmacd
ifType.7 = ethernetCsmacd
ifType.8 = ethernetCsmacd
ifType.9 = ethernetCsmacd
ifType.10 = ethernetCsmacd
ifType.11 = ethernetCsmacd
ifType.12 = ethernetCsmacd
ifType.13 = ethernetCsmacd
ifType.14 = ethernetCsmacd
ifType.15 = ethernetCsmacd
ifType.16 = ethernetCsmacd
ifType.11001 = l3ipvlan
ifType.11100 = l3ipvlan
Array
(
[1] => Array
(
[ifDescr] => Ethernet1/0/1
[ifName] => Ethernet1/0/1
[ifAlias] => do serwis 10.100.0.12 port 23
[ifType] => ethernetCsmacd
)
[2] => Array
(
[ifDescr] => Ethernet1/0/2
[ifName] => Ethernet1/0/2
[ifAlias] => do dlink 10g access 10.100.0.55 port 24
[ifType] => ethernetCsmacd
)
[3] => Array
(
[ifDescr] => Ethernet1/0/3
[ifName] => Ethernet1/0/3
[ifAlias] =>
[ifType] => ethernetCsmacd
)
[4] => Array
(
[ifDescr] => Ethernet1/0/4
[ifName] => Ethernet1/0/4
[ifAlias] =>
[ifType] => ethernetCsmacd
)
[5] => Array
(
[ifDescr] => Ethernet1/0/5
[ifName] => Ethernet1/0/5
[ifAlias] =>
[ifType] => ethernetCsmacd
)
[6] => Array
(
[ifDescr] => Ethernet1/0/6
[ifName] => Ethernet1/0/6
[ifAlias] =>
[ifType] => ethernetCsmacd
)
[7] => Array
(
[ifDescr] => Ethernet1/0/7
[ifName] => Ethernet1/0/7
[ifAlias] =>
[ifType] => ethernetCsmacd
)
[8] => Array
(
[ifDescr] => Ethernet1/0/8
[ifName] => Ethernet1/0/8
[ifAlias] =>
[ifType] => ethernetCsmacd
)
[9] => Array
(
[ifDescr] => Ethernet1/0/9
[ifName] => Ethernet1/0/9
[ifAlias] =>
[ifType] => ethernetCsmacd
)
[10] => Array
(
[ifDescr] => Ethernet1/0/10
[ifName] => Ethernet1/0/10
[ifAlias] =>
[ifType] => ethernetCsmacd
)
[11] => Array
(
[ifDescr] => Ethernet1/0/11
[ifName] => Ethernet1/0/11
[ifAlias] =>
[ifType] => ethernetCsmacd
)
[12] => Array
(
[ifDescr] => Ethernet1/0/12
[ifName] => Ethernet1/0/12
[ifAlias] =>
[ifType] => ethernetCsmacd
)
[13] => Array
(
[ifDescr] => Ethernet1/0/13
[ifName] => Ethernet1/0/13
[ifAlias] =>
[ifType] => ethernetCsmacd
)
[14] => Array
(
[ifDescr] => Ethernet1/0/14
[ifName] => Ethernet1/0/14
[ifAlias] =>
[ifType] => ethernetCsmacd
)
[15] => Array
(
[ifDescr] => Ethernet1/0/15
[ifName] => Ethernet1/0/15
[ifAlias] =>
[ifType] => ethernetCsmacd
)
[16] => Array
(
[ifDescr] => Ethernet1/0/16
[ifName] => Ethernet1/0/16
[ifAlias] =>
[ifType] => ethernetCsmacd
)
[11001] => Array
(
[ifDescr] => Vlan1
[ifName] => Vlan1
[ifAlias] =>
[ifType] => l3ipvlan
)
[11100] => Array
(
[ifDescr] => Vlan100
[ifName] => Vlan100
[ifAlias] =>
[ifType] => l3ipvlan
)
)
SQL[SELECT `name` FROM `port_association_mode` WHERE pom_id = '1']
SQL[SELECT * FROM `ports` WHERE `device_id` = '366' ORDER BY port_id]
..................
>> Runtime for discovery module 'ports': 0.2030 seconds with 2120 bytes
#### Unload disco module ports ####
Modules status: Global- OS Device Module [ ports-stack ] disabled globally.
Modules status: Global- OS Device Module [ entity-physical ] disabled globally.
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 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 udp:HOSTNAME:161 hrProcessorLoad]
hrProcessorLoad = No Such Object available on this agent at this OID
SQL[SELECT COUNT(*) FROM `processors` WHERE `device_id` = '366' AND `processor_type` != 'ucd-old']
SQL[SELECT * FROM `processors` WHERE `device_id` = '366']
>> Runtime for discovery module 'processors': 0.0980 seconds with 22120 bytes
#### Unload disco module processors ####
Modules status: Global- OS Device Module [ mempools ] disabled globally.
Modules status: Global- OS Device Module [ cisco-vrf-lite ] disabled globally.
Modules status: Global- OS Device Module [ cisco-mac-accounting ] disabled globally.
Modules status: Global- OS Device Module [ cisco-pw ] disabled globally.
Modules status: Global- OS Device Module [ cisco-vrf ] disabled globally.
Modules status: Global- OS Device Module [ cisco-cef ] disabled globally.
Modules status: Global- OS Device Module [ cisco-sla ] disabled globally.
Modules status: Global- OS Device Module [ cisco-cbqos ] disabled globally.
Modules status: Global- OS Device Module [ cisco-otv ] disabled globally.
Modules status: Global- OS Device Module [ ipv4-addresses ] disabled globally.
Modules status: Global- OS Device Module [ ipv6-addresses ] disabled globally.
Modules status: Global- OS Device Module [ route ] disabled globally.
Modules status: Global- OS Device+
#### Load disco module sensors ####
Pre-cache:
ENTITY-SENSOR: Caching OIDs: entPhysicalDescrSNMP[/usr/bin/snmpbulkwalk -v2c -c COMMUNITY -OQUs -m CISCO-ENTITY-SENSOR-MIB -M /opt/librenms/mibs udp:HOSTNAME:161 entPhysicalDescr]
entPhysicalDescr.1 = PLANET Technology Corporation chassis model SGS-6340-16XR
entPhysicalNameSNMP[/usr/bin/snmpbulkwalk -v2c -c COMMUNITY -OQUs -m CISCO-ENTITY-SENSOR-MIB -M /opt/librenms/mibs udp:HOSTNAME:161 entPhysicalName]
entPhysicalName.1 = SGS-6340-16XR
entPhySensorTypeSNMP[/usr/bin/snmpbulkwalk -v2c -c COMMUNITY -OQUs -m ENTITY-SENSOR-MIB -M /opt/librenms/mibs udp:HOSTNAME:161 entPhySensorType]
entPhySensorType = No Such Object available on this agent at this OID
entPhySensorScaleSNMP[/usr/bin/snmpbulkwalk -v2c -c COMMUNITY -OQUs -m ENTITY-SENSOR-MIB -M /opt/librenms/mibs udp:HOSTNAME:161 entPhySensorScale]
entPhySensorScale = No Such Object available on this agent at this OID
entPhySensorPrecisionSNMP[/usr/bin/snmpbulkwalk -v2c -c COMMUNITY -OQUs -m ENTITY-SENSOR-MIB -M /opt/librenms/mibs udp:HOSTNAME:161 entPhySensorPrecision]
entPhySensorPrecision = No Such Object available on this agent at this OID
entPhySensorValueSNMP[/usr/bin/snmpbulkwalk -v2c -c COMMUNITY -OQUs -m ENTITY-SENSOR-MIB -M /opt/librenms/mibs udp:HOSTNAME:161 entPhySensorValue]
entPhySensorValue = No Such Object available on this agent at this OID
SQL[SELECT attrib_value FROM devices_attribs WHERE `device_id` = '366' 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 = '366' 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 = '366' 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 = '366' 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 = '366' 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 = '366' AND S.poller_type = 'snmp']
Current: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class='current' AND S.device_id = D.device_id AND D.device_id = '366' 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 = '366' 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 = '366' 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 = '366' 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 = '366' 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 = '366' 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 = '366' 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 = '366' 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 = '366' 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 = '366' 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 = '366' AND S.poller_type = 'snmp']
Temperatures: 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 = '366' AND S.poller_type = 'snmp']
Voltages: SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class='voltages' AND S.device_id = D.device_id AND D.device_id = '366' AND S.poller_type = 'snmp']
>> Runtime for discovery module 'sensors': 0.2630 seconds with 20104 bytes
#### Unload disco module sensors ####
Modules status: Global- OS Device Module [ storage ] disabled globally.
Modules status: Global- OS Device Module [ hr-device ] disabled globally.
Modules status: Global- OS Device Module [ discovery-protocols ] disabled globally.
Modules status: Global- OS Device Module [ arp-table ] disabled globally.
Modules status: Global- OS Device Module [ discovery-arp ] disabled globally.
Modules status: Global- OS Device Module [ junose-atm-vp ] disabled globally.
Modules status: Global- OS Device Module [ bgp-peers ] disabled globally.
Modules status: Global- OS Device Module [ vlans ] disabled globally.
Modules status: Global- OS Device Module [ vmware-vminfo ] disabled globally.
Modules status: Global- OS Device Module [ libvirt-vminfo ] disabled globally.
Modules status: Global- OS Device Module [ toner ] disabled globally.
Modules status: Global- OS Device Module [ ucd-diskio ] disabled globally.
Modules status: Global- OS Device Module [ services ] disabled globally.
Modules status: Global- OS Device Module [ stp ] disabled globally.
Modules status: Global- OS Device Module [ ntp ] disabled globally.
Modules status: Global- OS Device Module [ loadbalancers ] disabled globally.
Modules status: Global- OS Device Module [ unix-agent ] disabled globally.
Modules status: Global+ OS Device
#### Load disco module system ####
>> Runtime for discovery module 'system': 6.1030 seconds with 96 bytes
#### Unload disco module system ####
Modules status: Global- OS Device Module [ ipmi ] disabled globally.
Modules status: Global- OS Device Module [ netstats ] disabled globally.
Modules status: Global- OS Device Module [ hr-mib ] disabled globally.
Modules status: Global- OS Device Module [ ucd-mib ] disabled globally.
Modules status: Global- OS Device Module [ ipSystemStats ] disabled globally.
Modules status: Global- OS Device Module [ wifi ] disabled globally.
Modules status: Global- OS Device Module [ ospf ] disabled globally.
Modules status: Global- OS Device Module [ cisco-ipsec-flow-monitor ] disabled globally.
Modules status: Global- OS Device Module [ cisco-remote-access-monitor ] disabled globally.
Modules status: Global- OS Device Module [ cipsec-tunnels ] disabled globally.
Modules status: Global- OS Device Module [ cisco-ace-loadbalancer ] disabled globally.
Modules status: Global- OS Device Module [ cisco-ace-serverfarms ] disabled globally.
Modules status: Global- OS Device Module [ netscaler-vsvr ] disabled globally.
Modules status: Global- OS Device Module [ aruba-controller ] disabled globally.
Modules status: Global- OS Device Module [ applications ] disabled globally.
Modules status: Global- OS Device Module [ cisco-asa-firewall ] disabled globally.
Modules status: Global- OS Device Module [ mib ] disabled globally.
Modules status: Global- OS Device Module [ cisco-voice ] disabled globally.
Modules status: Global- OS Device Module [ charge ] disabled globally.
SQL[SELECT attrib_value FROM devices_attribs WHERE `device_id` = '366' AND `attrib_type` = 'poll_mib' ]
SQL[SELECT attrib_value FROM devices_attribs WHERE `device_id` = '366' AND `attrib_type` = 'poll_mib' ]
MIB: registering
SNMP[snmptranslate -M /opt/librenms/mibs -IR -m all enterprises.10456.1.1566 2>/dev/null]
RFC1155-SMI::enterprises.10456.1.1566
SNMP translated: all::enterprises.10456.1.1566 -> RFC1155-SMI::enterprises.10456.1.1566
RFC1155-SMI::enterprises.10456.1.1566
Array
(
)
MIB: Could not load definition for RFC1155-SMI::enterprises.10456.1.1566
SQL[UPDATE `devices` set `last_discovered` =NOW(),`last_discovered_timetaken` ='2.077' WHERE `device_id` = '366']
Discovered in 2.077 seconds
SQL[INSERT INTO `perf_times` (`type`,`doing`,`start`,`duration`,`devices`,`poller`) VALUES ('discover','10.100.0.54','1488451214.7841','2.107','1','LIBRENMS\n')]
./discovery.php 10.100.0.54 2017-03-02 11:40:16 - 1 devices discovered in 2.107 secs
SNMP: Get[11/0.44s] Walk [12/0.55s]
MySQL: Cell[4/0.00s] Row[4/0.00s] Rows[24/0.01s] 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