ppp reconnects make network statistics impossible?

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

Moderators: Developers, Moderators

Post Reply
vimico
Posts: 2
Joined: Thu Oct 27, 2005 4:09 pm

ppp reconnects make network statistics impossible?

Post by vimico »

I'm using Debian Sarge Testing, Cacti 0.8.6g, net-snmp 5.2.1.2.
My ADSL connections is handled by the Linux box, i.e. it's doing the pppoe.

I was so proud, when I got cacti + snmp working a few days ago and my first network statistics appeared. But then the graph for the ppp0 device remained blank.

My ISP disconnects me every 24 h, but I can immediately reconnect (but I get another IP address) - which might be the reason for this problem.

When I noticed that no data were collected anymore, I manually checked the interfaces reported by snmp:

Code: Select all

# snmpwalk -v 2c -c public localhost 1.3.6.1.2.1.31.1.1.1.1
IF-MIB::ifName.1 = STRING: lo
IF-MIB::ifName.2 = STRING: eth0
IF-MIB::ifName.3 = STRING: eth1
IF-MIB::ifName.4 = STRING: sit0
IF-MIB::ifName.5 = STRING: ppp0
IF-MIB::ifName.6 = STRING: ppp0
IF-MIB::ifName.7 = STRING: ppp0
IF-MIB::ifName.8 = STRING: ppp0
After restarting snmp the table was correctly filled and I got data for my graphs:

Code: Select all

# /etc/init.d/snmpd restart
Restarting network management services: snmpd.
# snmpwalk -v 2c -c public localhost 1.3.6.1.2.1.31.1.1.1.1
IF-MIB::ifName.1 = STRING: lo
IF-MIB::ifName.2 = STRING: eth0
IF-MIB::ifName.3 = STRING: eth1
IF-MIB::ifName.4 = STRING: sit0
IF-MIB::ifName.8 = STRING: ppp0
Is this a know problem? Are there workarounds or solutions?
rkramer
Cacti User
Posts: 54
Joined: Fri Jun 03, 2005 12:25 pm

Post by rkramer »

how about a quick cron to restart snmp after every reconnect?
vimico
Posts: 2
Joined: Thu Oct 27, 2005 4:09 pm

Post by vimico »

rkramer wrote:how about a quick cron to restart snmp after every reconnect?
I'm restarting smnpd with a little script in the /etc/ppp/ip-up.d.

This is a work-around.

But I would very much like to know if the above mentioned behaviour is a bug or a feature.
Cloonix
Posts: 1
Joined: Sat Apr 21, 2007 1:53 am

Post by Cloonix »

Doesn't work for me. Every time my I reconnect the ppp0 connection Cacti does not longer show up traffic for that device.

I'm restarting the snmpd after a reconnect, but it doesn't help.

Any other ideas?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

It is possible to make cacti detect "changes" for SNMP Data Queries. In cacti lingo, this is coalled "re-indexing". There are three re-indexing options at time of writing.
Default is "uptime goes backwards", a symlink to "device was rebooted" :wink:
If cacti detects a re-index issue, it will rescan the interfaces (the same will happen, if you click the green circle next to the Data Query of that very host).

The task is now
- to find the field in the "interface" table that changes on reconnection (e.g. IP@)
- make cacti aware of that very field (this field must be the "index" defined by the file ./resources/snmp_queries/interface.xml)
Find some help at http://docs.cacti.net/node/227, but it's not specific for this very question
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest