reload SMNP cache ?

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
lynx
Posts: 3
Joined: Thu Aug 05, 2004 11:27 am

reload SMNP cache ?

Post by lynx »

Hello,

I have a strange problem:
I'm monitoring the traffic on ppp0 with SNMP. Everything works fine. But my provider resets the connection every 24 hours, so the ppp0 interface goes down, and PPPoE creates a new one by reconnecting.

This is normally fine, but somethines the interface ppp0 does not have the same index anymore. Say it was ppp0/4 its ppp0/5 now. But cacti does not know about this, and continues to monitor ppp0/4 which returns zero.

A solution is to go to the 'New Graphs' menu, and reload the SNMP query. Is there a way to automatically do this ?

Another problem is afterwards, that the graph has a huge spike, which is over the defined maximum...

Help appreciated :-)
melchandra
Cacti User
Posts: 311
Joined: Tue Jun 29, 2004 12:52 pm
Location: Indiana

Post by melchandra »

1. The reset thing you might be able to get around by telling it to index of of something other than the ifIndex, like ifName or ifDesc or something. There are other posts on this, it is a very common, and vary hard to solve problem.

2. Use the removespikes.pl script. http://www.raxnet.net/board/viewtopic.p ... espikes+pl
Dave
Guest

Post by Guest »

>1. The reset thing you might be able to get around by telling
> it to index of of something other than the ifIndex, like ifName
> or ifDesc or something.

well that's what I'm doing. I'm using the ifDesc but the problem is the snmp cache, which doesn't notice when the interface is changed...

> There are other posts on this, it is a very common, and vary
> hard to solve problem.

where can I find them ? what do I have to search for ?
melchandra
Cacti User
Posts: 311
Joined: Tue Jun 29, 2004 12:52 pm
Location: Indiana

Post by melchandra »

Use the Search link at the top of the page. As for what to search for, that's the art of searching. I got these by searching for "changing ifindex" and selecting all terms.

http://www.raxnet.net/board/viewtopic.php?t=4050
http://www.raxnet.net/board/viewtopic.php?t=2746
http://www.raxnet.net/board/viewtopic.php?t=678
Dave
lynx
Posts: 3
Joined: Thu Aug 05, 2004 11:27 am

Post by lynx »

as I mentionned, I tried all index types, which didn't solve the problem. I can choose from:
- ifDescr
- ifType
- ifIndex
- iffIP
- ifHwAddr
- ifSpeed

only ifDescr and ifType stay actually the same. It's currently set to ifDescr which shows ppp0/5. Later the interface may become ppp0/6 and cacti stops montoring it.
melchandra
Cacti User
Posts: 311
Joined: Tue Jun 29, 2004 12:52 pm
Location: Indiana

Post by melchandra »

well if everything switches (I'm guessing including the oid's) how do you expect Cacti to keep track of it? I guess the only way around your situation is to write a buffering script that keeps track of what the interface is and feeds data to Cacti. Then when it switches, all you have to do is change your script (or make the script intelligent enough) to get the new interface and report it back to cacti?
Dave
lynx
Posts: 3
Joined: Thu Aug 05, 2004 11:27 am

Post by lynx »

ifDescr and ifType stay the same. it should be possible to monitor an interface called ppp0, right ?
but cacti internally maps ppp0 to the interface index somehow (still using ifDescr as index) and loses the interface when something changes. the SNMP cache of cacti is the problem. thus my question, if it can be reloaded automatically...

should I post this question on the devel mailing list ?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest