Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
Hi,
I'm working with a fresh install of 0.8.6g on a Redhat 8.0 box, and I'm having a bit of trouble seeing some of the interface stats. I've been searching the forums and docs, but can't seem to pin down the cause.
This box has PHP 4.3.11 from source, and net-snmp 5.0.9 from RPM (official RH8 updates). I'm monitoring other unix hosts, using snmpv1. The graphs look fine, and all other functions seem OK, it's just that when I debug the interface data query, the normal values for these three OIDs contain only the integers, or null values:
which matches up with the "Hardware Address" oid in resource/snmp_queries/interface.xml . It should get the index numbers when it walks .1.3.6.1.2.1.2.2.1.1 , so what I don't understand is why it's not getting the strings from ifPhysAddress. It seems to pull the ifDescr strings just fine.
I did read somewhere that snmpwalk is supposed to stop walking a branch if it reaches a blank return (signifying end-of-branch), and I wonder of the Cacti does the same thing, and stops because the first element in the list doesn't seem to return a result...
I did read somewhere that snmpwalk is supposed to stop walking a branch if it reaches a blank return (signifying end-of-branch), and I wonder of the Cacti does the same thing, and stops because the first element in the list doesn't seem to return a result...
Interesting theory. The indexes in this case represent lo, eth0, and eth1. On Linux machines, net-snmp seems to always list "lo" first, and it never has a hardware address. On FreeBSD it sticks "lo0" somewhere in the middle. However, I have the same problem on the FreeBSD boxes I'm monitoring, so I don't think that explains what I'm seeing.
Well, a little more digging revealed it's happening on everything I'm monitoring, not just Linux and FreeBSD hosts. I'm also hitting a Cisco Catalyst switch and a Foundry ServerIron. The interface list on both of these also shows no text for the status, type or hardware address. In the case of status and type, only the numeric value is shown. The hardware address column is blank.
So it would seem that something in my Cacti setup is wonky, but I believe I followed all the installation docs and did a pretty vanilla setup.
I'm attaching two screenshots, one of the Catalyst and one of a Linux UCD/Net host. Maybe someone will stumble across it and provide a "eureka!" moment.
Are you using php_snmp or the net-snmp binaries? If you are using the binaries, there is a change you can make to lib/snmp.php that will address your problem. If you are using php_snmp, it was likely due to a php upgrade.
TheWitness
True understanding begins only when we realize how little we truly understand...
TheWitness wrote:Are you using php_snmp or the net-snmp binaries?
I suppose I am using PHP's builtin SNMP, because it shows up in a 'php -m'. If I want to switch to the net-snmp tools, what config change has to happen? I'm new to Cacti, please forgive me.
In your experience, what happens in a PHP upgrade to break SNMP? I installed 4.3.11 from source, over top of a 4.3.2 installation (also from source) that I could not get to recompile properly.
I ran into the same problem with a brand-new install of 0.8.6g on CentOS 4.1 with net-snmp 5.1.2-11.EL4.6 and php (w/snmp) 4.3.9-3.8. The only difference is that with this setup, I am seeing the hardware address. However, both link status and ifType are still just numbers.
Based on the discussion in pirx's thread, I grabbed lib/snmp.php from 0.8.6c and voila, I now see link status and ifType as their names instead of just numbers.
I don't know what this means for developers, but if I can be of assistance, please let me know.
I ran into the same problem with a brand-new install of 0.8.6g on CentOS 4.1 with net-snmp 5.1.2-11.EL4.6 and php (w/snmp) 4.3.9-3.8. The only difference is that with this setup, I am seeing the hardware address. However, both link status and ifType are still just numbers.
Based on the discussion in pirx's thread, I grabbed lib/snmp.php from 0.8.6c and voila, I now see link status and ifType as their names instead of just numbers.
I don't know what this means for developers, but if I can be of assistance, please let me know.
I still have the same problem here on 3 different cacti hosts. If I switch back to snmp.php from 0.8.6c the verbose information is back again.
Can one of you all test the following. Take the production 0.8.6g version of snmp.php and remove the following lines. Then rerun and tell me if it's fixed.
TheWitness wrote:Can one of you all test the following. Take the production 0.8.6g version of snmp.php and remove the following lines. Then rerun and tell me if it's fixed.
before:
1 2 FastEthernet0/1 Fa0/1 6 100000000
...changed code and hit the reindex button:
after
1 Down FastEthernet0/1 Fa0/1 ethernetCsmacd(6) 100000000 00:00:12:D9:92:AF:41
I can reproduce this. After adding the code again, the verbose output is gone again. So, this really seems to be the problem.
Ralf
Last edited by pirx on Wed Oct 19, 2005 1:53 am, edited 1 time in total.
Thanks for the help pirx. I'm busy getting this new install going for a client, so I wasn't able to test.
On a related topic, if I wanted to display the ifOperStatus somewhere on the graph (now that I am seeing meaningful results), where would make the most sense? I've already got a pretty long title in the graph template, i.e.
( |host_description| - Traffic - |query_ifName| (|query_ifAlias|))
so I don't want to put it there.
Is it possible to put this query result into the actual graph text, say below the Inbound/Outbound legend at the bottom? I've looked at the graph template but I don't see a way to insert an SNMP query result.