sysObjectID not returning numeric IDs

Support questions about the MAC Track plugin

Moderators: Moderators, Developers

Post Reply
Author
Message
tbilan
Posts: 15
Joined: Fri Sep 14, 2012 6:57 pm

sysObjectID not returning numeric IDs

#1 Post by tbilan » Fri Nov 15, 2013 7:10 pm

I had a problem where the mactrack SNMP requests weren't returning numeric OIDs so all my devices would show an Error status in the mactrack Devices Status column. This was weird since they showed as numeric when I configured them and hit Save as result shown in 1.jpg.
1.jpg
1.jpg (4.17 KiB) Viewed 1638 times

Code: Select all

mysql> select device_name, snmp_sysObjectID from mac_track_devices;
+----------------+-----------------------+
| device_name    | snmp_sysObjectID      |
+----------------+-----------------------+
| XC-I017-8MDFR3 | iso.3.6.1.4.1.9.1.697 |
| XCSC1GW        | iso.3.6.1.4.1.9.1.516 |
| XCE1GW         | iso.3.6.1.4.1.9.1.923 |
+----------------+-----------------------+
I added the following code in the cacti snmp.php file to force numeric results since I couldn't see a way to do this from the mactrack_functions.php. It's been running all day and I haven't had any issues with other areas of cacti.

Code: Select all

if (function_exists("snmp_set_oid_numeric_print")) {
     snmp_set_oid_numeric_print(TRUE);
     snmp_set_oid_output_format(SNMP_OID_OUTPUT_NUMERIC);
}
I could have probably chosen to just specify the device type with the non-numeric OID but since mactrack expects numerics and probably every other module I thought I'd just fix the source.

This was kind of a pain to track down so I thought I'd share it.
Attachments
snmp.zip
(4 KiB) Downloaded 70 times

Post Reply