Device OS type mis-detected (AeroHive OS instead of JunOS) - Build 1.37-102-g2537291

Hi guys,

We’ve got two instances of LibreNMS, both running the current daily build which are mis-detecting JunOS devices as AeroHive OS, but strangely not all of them.

Install #1 - EX4200 (Virtual Chassis) detected as AeroHive OS (there are other EX4200 switches listed correctly, along with about 250 EX2200’s).

Install #2 - SRX110 detected as AeroHive OS (there are other SRX models detected correctly).

Install #1

====================================

Component Version
LibreNMS 1.37-102-g2537291
DB Schema 247
PHP 7.0.28-0ubuntu0.16.04.1
MySQL 10.0.34-MariaDB-0ubuntu0.16.04.1
RRDTool 1.5.5
SNMP NET-SNMP 5.7.3
====================================

Install #2

Component Version
LibreNMS 1.37-102-g2537291
DB Schema 247
PHP 7.0.28-0ubuntu0.16.04.1
MySQL 10.0.34-MariaDB-0ubuntu0.16.04.1
RRDTool 1.5.5
SNMP NET-SNMP 5.7.3
====================================

I’ve tried some remedial fixing, based on this thread - Previous Similar Issue

That hasn’t fixed it, however.

Any ideas greatly received.

Cheers
Andy

HI All,

Just for completeness, when we try to rediscover the OS on one of these devices, we get -

root@XXXXXXXX:/opt/librenms# ./discovery.php -h srv-stack -m os -d
LibreNMS Discovery

Version info:
Commit SHA: 253729173481cf71f7b888c5ebaa42e19a61d7d1
Commit Date: 1521836582
DB Schema: 247
PHP: 7.0.28-0ubuntu0.16.04.1
MySQL: 10.0.34-MariaDB-0ubuntu0.16.04.1
RRDTool: 1.5.5
SNMP: NET-SNMP 5.7.3
==================================DEBUG!
Updating os_def.cache… Done
SQL[SELECT * FROM devices WHERE disabled = 0 AND snmp_disable = 0 AND hostname LIKE ‘srv-stack’ ORDER BY device_id DESC]
SQL[SELECT * FROM devices_attribs WHERE device_id = ‘7’]
srv-stack 7 hiveos-network SQL[INSERT INTO device_perf (xmt,rcv,loss,min,max,avg,device_id,timestamp) VALUES (‘3’,‘3’,‘0’,‘1.26’,‘1.57’,‘1.40’,‘7’,NOW())]
SNMP Check response code: 0
SQL[SELECT attrib_value FROM devices_attribs WHERE device_id = ‘7’ AND attrib_type = ‘poll_mib’ ]
Attempting to initialize OS: hiveos-network
OS initilized as 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:/opt/librenms/mibs/aerohive udp:HOSTNAME:161 sysName.0 sysObjectID.0 sysDescr.0]
...0 = SRV-STACK
...0 = ..4.1.26.2.31
...0 = SRV-STACK

Runtime for discovery module ‘core’: 0.0140 seconds with 1032 bytes
SNMP: [2/0.03s] MySQL: [8/0.01s] RRD: [0/0.00s]

Unload disco module core

Modules status: Global+ OS+ Device

Load disco module os

SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -Ovq -M /opt/librenms/mibs:/opt/librenms/mibs/aerohive udp:HOSTNAME:161 SNMPv2-MIB::sysDescr.0]
SRV-STACK

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

| SRV-STACK | .1.3.6.1.4.1.2636.1.1.1.2.31 |
SNMP[/usr/bin/snmpget -v2c -c COMMUNITY -Oqv -M /opt/librenms/mibs:/opt/librenms/mibs/aerohive udp:HOSTNAME:161 .1.3.6.1.4.1.12148.10.2.6.0]
No Such Object available on this agent at this OID

OS: Aerohive HiveOS (hiveos-network)

Runtime for discovery module ‘os’: 0.0560 seconds with 1376 bytes
SNMP: [3/0.05s] MySQL: [0/0.00s] RRD: [0/0.00s]

Unload disco module os

SQL[SELECT attrib_value FROM devices_attribs WHERE device_id = ‘7’ AND attrib_type = ‘poll_mib’ ]
SQL[UPDATE devices set last_discovered =NOW(),last_discovered_timetaken =‘1.1’ WHERE device_id = ‘7’]
Discovered in 1.1 seconds

SQL[INSERT INTO perf_times (type,doing,start,duration,devices,poller) VALUES (‘discover’,‘srv-stack’,‘1521913369.8849’,‘1.353’,‘1’,‘librenms00’)]
./discovery.php srv-stack 2018-03-24 17:42:51 - 1 devices discovered in 1.353 secs
SNMP [5/0.08s]: Get[5/0.08s] Getnext[0/0.00s] Walk[0/0.00s]
MySQL [11/0.01s]: Cell[2/0.00s] Row[2/0.00s] Rows[4/0.00s] Column[0/0.00s] Update[1/0.00s] Insert[2/0.01s] Delete[0/0.00s]
RRD [0/0.00s]: Update[0/0.00s] Create [0/0.00s] Other[0/0.00s]

Cheers
Andy

Looks like you’re setting the sysDescr value? SRV-STACK

That’s matching our detection for the aerohive stuff. I’d suggest you leave sysDescr to be the default.

Hi laf,

Thanks for the response.

The sysDescr maybe a reason for the EX4200 (it really is called SRV-STACK), but why the SRX110?

Best regards
Andy

Actually, ignore my last. Both SRX and EX are now back as JunOS devices. I suspect the daily.sh update has fixed it (?).

Andy

I submitted a fix yesterday, just forgot to reply here.