Problem with grpah generate with snmp

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

Moderators: Developers, Moderators

Post Reply
drworld

Problem with grpah generate with snmp

Post by drworld »

We use cacti since serval weeks to monitor some server and ADSL gateway, but we have lot of trouble when cacti try to retrieve the information by SNMP. Indeed it seems that cacti doesn't like when the interface number change (mrtg doesn't have the same trouble) ...

Ne1 know the problem ?

regards
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

That is very true, cacti really has no protection for this. MRTG re-reads this data after each polling (I think), and therefore this is not a problem. I'd like to include support for this in 0.8 if at all possible.

On that note, it would be really nice if I could get some good "SNMP guru" to do some work on 0.8. My knowledge of SNMP is pretty good, but cacti's SNMP support is no where near where MRTG's is. I think having this sturdy foundation would make other things easier for everyone.

-Ian
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Post by bulek »

The problem seems to be quite easy to resolve. The goal is to use something diffenrent to interface index as an interface identifier. This should be more permanent than interface index which can change after reboot or even after configuration change. There are several possible choices however good enough is interface description (eth0, Serial1/2.34, etc...) . If you choose in MRTG that your identifier is interface description then MRTG before each poll will fetch ifDescr table for the device, then it creates description to index mapping. That's all - now you can poll SNMP objects (because you know their current indexes).

Side effect is much more SNMP traffic generated with every poll and longer time needed for polling. The time can be decreased considerably if you use snmpbulkwalk for fetching ifDescr table instead of snmpwalk - the device has to support SNMP v. 2c in this case (actually you should also use snmpbulkget in "SNMPInterfaces" section of Cacti for device discovery).

The problem is more general because there are other parts of MIB interesting for monitoring not related directly to interfaces and objects indexes are also changing frequently. I wrote a small script for monitoring QoS elements in Cisco routers. Before gathering statistics for I map ClassMap names to SNMP objects containing the stats (which results in fetching several SNMP tables first). The indexes are changing quite often but I am safe because ClassMap names are fixed.

Returning to main topic I think that you can give the user a possibility to choose identifier of interface (SNMP index, ifDescr, locIfDescr, etc.). Then mapping process can be automatic before each poll or allow user to start mapping process manually.

I see more and more features coming with v. 0.8... this will be state of art :-)
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests