Yikes i see what you mean! Got it working but encountered a few issues, sharing for info.
I thought it would be easier as i found a MiBfile already in LibreNMS which i could use CISCO-AAA-SESSION-MIB
Edit the definitions first !
After enabling the “mib” module under Edit → modules. It automatically allocated the default register_mib located in the definitions.
I didn’t expect there to be anything in there the default was:
ciscoAAASessionMIB: CISCO-AAA-SESSION-MIB
I edited the register_mib to be the OID i wanted.
register_mibs:
casnActiveTableEntries: CISCO-AAA-SESSION-MIB
Unfortunately it didn’t remove the first existing entry. I removed as a precaution librenms/cache/os_defs.cache but no success.
I Found a similar issue mentioned here: How to remove unwanted MIB associations
Then i found how to delete the old MiB entry [Ability to Un-Register MIBs · Issue #2779 · librenms/librenms · GitHub]
delete from mibdefs
;
delete from device_mibs
;
delete from device_oids
;
delete from graph_types
where graph_section
= ‘mib’;
includes/discovery/os/ruckuswireless.inc.php does not exist as mentioned the MiB based polling document.
Do i need this file ? I created it anyway… (I’m not sure if this is correct)
librenms/includes/discovery/os/iosxe.inc.php
<?php
if (!$os) {
if (strstr($sysObjectId, ".1.3.6.1.4.1.9.1.925")) {
$os = "iosxe";
$extra_mibs = array("casnActiveTableEntries" => "CISCO-AAA-SESSION-MIB");
register_mibs($device, $extra_mibs, "includes/discovery/os/iosxe.inc.php");
}
}
?>
To test the OID is correct I used the same syntax as in the script:
/usr/bin/snmpbulkwalk -v2c -c COMMUNITY -OQUsb -m CISCO-AAA-SESSION-MIB - /opt/librenms/mibs:/opt/librenms/mibs/cisco -t 2 -r 3 udp:HOSTNAME:161 casnActiveTableEntries
To debug issues i was re-discovering and repolling (not sure if you had to re-discover)
./discovery.php –h HOSTNAME
./poller.php -h HOSTNAME -f -d -m mib
Now after 10 minutes my MiB graph has re-popped up so happy it is working now