[SOLVED] [0.8.8b] Some ifAlias Are in Hex

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
tylerc
Posts: 24
Joined: Tue Aug 13, 2013 10:59 pm

[SOLVED] [0.8.8b] Some ifAlias Are in Hex

Post by tylerc »

Fresh install of Cacti 0.8.8b on Ubuntu 12.10.

Cacti says the ifAlias for a particular interface is:

Code: Select all

+ Found item [ifAlias='5B:49:50:53:45:43:5D:20:C2:A0:20:C2:A0:7C:20:53:46:4F:31:20:74:6F:20:4E:59:43:31:20:49:50:53:45:43:20:54:75:6E:6E:65:6C'] index: 556 [from value]
However, when I manually check, I'm showing the correct information from the same server to the same device as the user that (should) be running the commands:

Code: Select all

tylerc@harbl:/usr/share/cacti$ sudo su - cacti
No directory, logging in with HOME=/
$ snmpwalk -v2c -cxxxxxxxxx 10.1.10.2 ifAlias.556
IF-MIB::ifAlias.556 = STRING: [IPSEC]    | SFO1 to NYC1 IPSEC Tunnel
$
MIBs are in /usr/share/mibs/netsnmp and /usr/share/mibs/ietf.

I really need to know why this happens and how to fix it. I'm not sure what additional info you guys need. Whatever it is, I'll provide it. :)

[EDIT]
This seems (to me, anyway) to be an OID translation issue. If I disable the loading of the IF-MIB and walk the device by the OID number, I get the same hex values:

Code: Select all

tylerc@cacti01.ops.nyc1.beats:/usr/share/cacti$ sudo su - cacti
No directory, logging in with HOME=/
$ snmpwalk -v2c -cxxxxxxxxx 10.1.10.2 .1.3.6.1.2.1.31.1.1.1.18.556
iso.3.6.1.2.1.31.1.1.1.18.556 = Hex-STRING: 5B 49 50 53 45 43 5D 20 C2 A0 20 C2 A0 7C 20 53
46 4F 31 20 74 6F 20 4E 59 43 31 20 49 50 53 45
43 20 54 75 6E 6E 65 6C
$
Any thoughts/ideas?

Thanks!

--Tyler

[/EDIT]

[EDIT 2]

Even after changing the SNMP version to v1 and reducing the Max OIDs to 1, I have the same issue.

[/EDIT 2]
Last edited by tylerc on Wed Aug 14, 2013 1:11 am, edited 1 time in total.
tylerc
Posts: 24
Joined: Tue Aug 13, 2013 10:59 pm

[SOLVED] [HOWTO] [0.8.8b] Some ifAlias Are in Hex

Post by tylerc »

WARNING:

Although the below contains helpful information, it is sprinkled with a rant as well. Please don't be offended--I am just of the opinion that Ubuntu is horrible and should never be used for anything important or for anything that needs to be done quickly.



[EDIT]

It's worth noting that this problem may present itself in a strange manner. You may notice some `ifAlais` OIDs translated properly while others are returned with ridiculous hex nonsense. Even though it makes absolutely no sense whatsoever, you should probably try the below steps anyway because this is probably what the problem is if you're forced to use Ubuntu (or possibly Debian and other Debian derivatives).

[/EDIT]

CONTENT:

As incredibly ridiculous as this is, I have fixed the issue. I'm actually a bit irritated about all of the hoops I had to jump through, but this was DEFINITELY an SNMP OID translation issue and it was NOT a Cacti issue.

To save everyone else ridiculous stress if you are for some reason forced to do something stupid like use Ubuntu (my company is standardizing on it):

When installing libsnmp, the IETF MIBs are not installed by default because Ubuntu maintainers are butthurt about licensing. Install standard MIBs:

Code: Select all

sudo apt-get install snmp-mibs-downloader
(optional: write to Ubuntu maintainers and tell them to stop being so butthurt and install these by default)

Now, you won't be able to actually do anything by MIB name and you might find that you have ridiculous results returned in hex if you try to get/walk an OID. You need to edit the snmp configuration.
sudo vi /etc/snmp/snmp.conf

# go to bottom of file
[a]
<enter>
mibs +IF-MIB
<escape>
[:wq]
Explanation of previous code block: the 'sudo vi' opens the config file in vi, a text editor (which may or may not be symlinked to vim in Ubuntu...not sure). Anything in squared brackets ( between [ and ] ) is meant to be typed literally. The `a` puts you in 'insert' mode; the `:wq` saves and closes the file. Anything in angled brackets ( between < and > ) is a key that should be pressed on your keyboard. If there's a hash ( # ), you don't type that--it's a comment.

Now you can get/walk OIDs on the command-line if they're in IF-MIB. But...Cacti is still going to show you ridiculous hex nonsense.

Turns out that because Cacti is using PHP and PHP's SNMP stuff is derp, you have to actually restart Apache.

Code: Select all

sudo service apache2 restart
Now everything is golden.

The better solution to all of this? Don't use something that is as horrible as Ubuntu. Ubuntu makes baby Jesus cry. Use Arch. Or BSD. Or CentOS/RHEL/Fedora if you're in love with RH distributions. Something tells me that Debian would suffer from these same issues as they tend to get their feelings hurt by licensing, too.

Of course, if you actually know ahead of time that standard MIBs aren't included in Ubuntu by default and you just download them out of habit because you're used to using a horrible distribution, you won't have to waste hours trying to figure out why Cacti is spitting hex at you because you would have installed the MIBs BEFORE starting httpd (why is it called apache2 in Ubuntu? and why is everything located in weird places?). Or you would've done it prior to some step that required you to restart httpd anyway.
ktdreyer
Posts: 9
Joined: Mon Sep 08, 2008 2:38 am

Re: [SOLVED] [0.8.8b] Some ifAlias Are in Hex

Post by ktdreyer »

Can you explain more of the
butthurt about licensing
?

If there's a problem with an SNMP MIB license, it's possible that other Linux distributions will be affected as well.
tylerc
Posts: 24
Joined: Tue Aug 13, 2013 10:59 pm

Re: [SOLVED] [0.8.8b] Some ifAlias Are in Hex

Post by tylerc »

ktdreyer wrote:If there's a problem with an SNMP MIB license, it's possible that other Linux distributions will be affected as well.
It's an issue that is specific to Ubuntu/Debian. They (and other Debian derivatives) are well-known for drinking from the RMS Kool-Aid.

Please see the Debian Free Software Guidelines (http://www.debian.org/social_contract#guidelines) for more details.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests