LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-12-2023, 07:57 AM   #1
czezz
Member
 
Registered: Nov 2004
Distribution: Slackware/Solaris
Posts: 924

Rep: Reputation: 43
[WORKAROUND] mrtg - network interface changed it's index. How to MANUALLY change it in MRTG?


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 2023
On 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 data
In 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)

Last edited by czezz; 08-17-2023 at 04:24 PM.
 
Old 08-17-2023, 04:22 PM   #2
czezz
Member
 
Registered: Nov 2004
Distribution: Slackware/Solaris
Posts: 924

Original Poster
Rep: Reputation: 43
I didnt find the way to change the index manually.
Not even by re-running cfgmaker.

The WA was to restart router and somehow it reverted the ifIndex back to 11.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change the default webpage configuration from index.php to index.htm, etc meema Linux - Server 4 08-22-2008 09:06 PM
Apache 404 index.php not Found but index.php exists at document root mark84 Linux - Server 20 07-27-2008 01:55 AM
apache index.html doesn't show up but index.php do zoffmann Linux - Server 5 01-28-2008 03:53 PM
Where to put index.php (or index.html) on Slackware 11.0 moonguide Slackware 3 05-08-2007 06:35 PM
Installing icon theme? i have a index.theme and index.desktop, no directions! mr_coffee Linux - Newbie 2 01-25-2006 01:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration