Article 6DSFY mrtg - network interface changed it's index. How to MANUALLY change it in MRTG?

mrtg - network interface changed it's index. How to MANUALLY change it in MRTG?

by
czezz
from LinuxQuestions.org on (#6DSFY)
Network interface on my router has (somehow) automatically changed ifIndex from 11 to 19

Code:snmpwalk -v2c -c public 192.168.1.1 ifIndex
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifIndex.3 = INTEGER: 3
IF-MIB::ifIndex.4 = INTEGER: 4
IF-MIB::ifIndex.5 = INTEGER: 5
IF-MIB::ifIndex.6 = INTEGER: 6
IF-MIB::ifIndex.7 = INTEGER: 7
IF-MIB::ifIndex.9 = INTEGER: 9
IF-MIB::ifIndex.10 = INTEGER: 10
IF-MIB::ifIndex.19 = INTEGER: 19 <-- that was 11 when I generated mrtg.chg on April 2023On the mrtg.log I can see it happened on: 2023-08-10 11:55:06
Code:2023-08-10 11:45:05 -- Started mrtg with config '/etc/mrtg.cfg'
2023-08-10 11:50:04 -- Started mrtg with config '/etc/mrtg.cfg'
2023-08-10 11:55:05 -- Started mrtg with config '/etc/mrtg.cfg'
2023-08-10 11:55:06 -- 2023-08-10 11:55:06: WARNING: Can not determine ifNumber for public@192.168.1.1:::::2 ref: 'Name' key: 'wlan0'
2023-08-10 11:55:08 -- 2023-08-10 11:55:06: ERROR: Target[192.168.1.1_wlan0][_IN_] ' $target->[6]{$mode} ' did not eval into defined data
2023-08-10 11:55:08 -- 2023-08-10 11:55:06: ERROR: Target[192.168.1.1_wlan0][_OUT_] ' $target->[6]{$mode} ' did not eval into defined data
2023-08-10 12:00:05 -- Started mrtg with config '/etc/mrtg.cfg'
2023-08-10 12:00:06 -- 2023-08-10 12:00:06: WARNING: Can not determine ifNumber for public@192.168.1.1:::::2 ref: 'Name' key: 'wlan0'
2023-08-10 12:00:07 -- 2023-08-10 12:00:06: ERROR: Target[192.168.1.1_wlan0][_IN_] ' $target->[6]{$mode} ' did not eval into defined data
2023-08-10 12:00:07 -- 2023-08-10 12:00:06: ERROR: Target[192.168.1.1_wlan0][_OUT_] ' $target->[6]{$mode} ' did not eval into defined dataIn mrtg.cfg I can see that previously this interface index was: 11
Code:...
### Interface 11 >> Descr: 'wlan0' | Name: 'wlan0' | Ip: 'No Ip' | Eth: 'No Ethernet Id' ###
...Question: how can I tell MRTG to look now on ifIndex = 19 instead of 11?

The easiest would be to re-generate mrtg.cfg with cfgmaker.
But there MUST be way to manually change that (and it is nowhere in mrtg.cfg)
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments