I'm using net-snmp 5.2.1.2 on Debian Sarge, to get traffic statistics into the current version of Cacti. See also:
http://www.linuxquestions.org/questi...hreadid=378983
The Linux box handles my ppp connection (pppoe, ADSL). My ISP reconnects me every 24 h, and rppppoe reconnects immediately, but Cacti stops recording data.
After some research I found that every reconnect creates an additional entry for ppp0 in the snmp table:
Code:
# 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
IF-MIB::ifName.11 = STRING: ppp0
The interfaces are correctly marked up and down:
Code:
# snmpwalk -v 2c -c public localhost 1.3.6.1.2.1.2.2.1.8.8
IF-MIB::ifOperStatus.8 = INTEGER: down(2)
# snmpwalk -v 2c -c public localhost 1.3.6.1.2.1.2.2.1.8.11
IF-MIB::ifOperStatus.11 = INTEGER: up(1)
As I have to reconnect every day, the table fills up. Apparently Cacti doesn't like multiple instances of the same device in the interface table and records the offline status of the "old" one.
As a workaround I restart snmpd after the reconnect (via ppp/ip-up.d). This cleans the table and cacti finds the correct ppp0 device to record data from.
I wonder, is this bug or a feature?