New OS Script

Hi all,

I’m having issues adding a new OS for an EMClarity E620.

I’ve obtained the MIB from the vendor, and put it under /opt/librenms/mibs/emclarity/ but I’m getting the following error and I’m not sure how to proceed.

$ ./scripts/new-os.php -h 121 -o emclarity -t wireless -v emclarity

sysDescr: Linux E620 2.6.32.23 #1 Fri May 20 01:23:46 EST 2011 armv5teb
sysObjectID: .1.3.6.1.4.1.8072.3.2.10

We already detect this device as OS linux type, do you want to continue to add sensors? (Y/n) y
ctrl+c to exit now otherwise please enter the MIB name including path (url is also fine) for us to check for sensors: /opt/librenms/mibs/emclarity/ETHERMUX-E620-V1-MIB
MIB search path: /opt/librenms/mibs:/opt/librenms/mibs/emclarity
Cannot find module (ETHERMUX-E620-V1-MIB): At line 1 in (none)
Unable to find a matching object identifier for “.*Table$”
/opt/librenms/includes/definitions/discovery/emclarity.yaml already exists, here’s the data we would have added:$
$

Same issue if I say “No” to continue to add sensors to Linux OS type

$ ./scripts/new-os.php -h 121 -o emclarity -t wireless -v emclarity

sysDescr: Linux E620 2.6.32.23 #1 Fri May 20 01:23:46 EST 2011 armv5teb
sysObjectID: .1.3.6.1.4.1.8072.3.2.10

We already detect this device as OS linux type, do you want to continue to add sensors? (Y/n) n
Enter the description for this OS, i.e Cisco IOS: EMClarity
Enter the logo to use, this can be the name of an existing one (i.e: cisco) or the url to retrieve one: https://emclarity.com.au/wp-content/uploads/2019/03/EMClarity-CMYK.svg
ctrl+c to exit now otherwise please enter the MIB name including path (url is also fine) for us to check for sensors: /opt/librenms/mibs/emclarity/ETHERMUX-E620-V1-MIB
MIB search path: /opt/librenms/mibs:/opt/librenms/mibs/emclarity
Cannot find module (ETHERMUX-E620-V1-MIB): At line 1 in (none)
Unable to find a matching object identifier for “.*Table$”

When specifying the MIB on my VPS (instead of local path) the “Cannot find module” error no longer occurs but the matching object identifier still has issues.

$ ./scripts/new-os.php -h 121 -o emclarity -t wireless -v emclarity
The OS emclarity appears to exist already, skipping to sensors support
ctrl+c to exit now otherwise please enter the MIB name including path (url is also fine) for us to check for sensors: https://derova.net/files/E620-MIB
Unable to find a matching object identifier for “.*Table$”
/opt/librenms/includes/definitions/discovery/emclarity.yaml already exists, here’s the data we would have added:$

Edit*
Looks like I have to do some troubleshooting with snmptranslate

~$ snmptranslate -m /opt/librenms/mibs/emclarity/ETHERMUX-E620-V1-MIB -IR -On notifMinorAlarms
MIB search path: /home/noc/.snmp/mibs:/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp
Cannot find module (SNMPv2-SMI): At line 5 in /opt/librenms/mibs/emclarity/ETHERMUX-E620-V1-MIB
Did not find ‘enterprises’ in module #-1 (/opt/librenms/mibs/emclarity/ETHERMUX-E620-V1-MIB)
Did not find ‘mib-2’ in module #-1 (/opt/librenms/mibs/emclarity/ETHERMUX-E620-V1-MIB)
Unlinked OID in ETHERMUX-E620-V1: em ::= { enterprises 10132 }
Undefined identifier: enterprises near line 13 of /opt/librenms/mibs/emclarity/ETHERMUX-E620-V1-MIB

Edit*
So I got the snmptranslate working by installing snmp-mibs-downloader on Ubuntu but New OS script still failing.

~$ sudo apt-get install snmp-mibs-downloader
The following additional packages will be installed:
smistrip
Suggested packages:
unzip
The following NEW packages will be installed:
smistrip snmp-mibs-downloader

~$ snmptranslate -m /opt/librenms/mibs/emclarity/ETHERMUX-E620-V1-MIB -IR -On notifMinorAlarms
.1.3.6.1.4.1.10132.200.8.2

~$ snmptranslate -m /opt/librenms/mibs/emclarity/ETHERMUX-E620-V1-MIB -IR -On superSiteName
.1.3.6.1.4.1.10132.200.1.5


@niklasdahlheimer per the thread above, did you fix this on the device itself? I don’t seem to have restrictions on my hardware but sysObjectID.0 is not found for me.

$ snmpwalk 172.16.0.86 -v2c -c public sysObjectID.0
sysObjectID.0: Unknown Object Identifier (Sub-id not found: (top) -> sysObjectID)