MRTG config check error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
TBT
Posts: 625
Joined: Wed May 18, 2011 1:26 pm

MRTG config check error

Post by TBT »

Prior to upgrading XI, I always run an MRTG configuration check. Can anyone explain the resulting error along with recommended resolution?

Check command:

Code: Select all

LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg .check
Resulting error:

Code: Select all

2018-04-24 10:19:57: WARNING: Expected a number but got 'noSuchInstance'
2018-04-24 10:20:03: ERROR: Target[192.168.1.107_572][_IN_] ' $target->[787]{$mode} ' did not eval into defined data
2018-04-24 10:20:03: ERROR: Target[192.168.1.107_572][_OUT_] ' $target->[787]{$mode} ' did not eval into defined data
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: MRTG config check error

Post by scottwilkerson »

All I could find on the topic was this previous thread about 1 1/2 years ago with the same problem.

https://support.nagios.com/forum/viewto ... =6&t=38502

TLDR
After investigating, some equipment creates and changes virtual interfaces and if the interface in the mrtg configuration no longer exists you would get the error like above.

There is a mechanism for recreating the MRTG config without some of the interface types known to be dynamic outlined in the final post

https://support.nagios.com/forum/viewto ... 20#p187533
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
TBT
Posts: 625
Joined: Wed May 18, 2011 1:26 pm

Re: MRTG config check error

Post by TBT »

scottwilkerson wrote:All I could find on the topic was this previous thread about 1 1/2 years ago with the same problem.

https://support.nagios.com/forum/viewto ... =6&t=38502

TLDR
After investigating, some equipment creates and changes virtual interfaces and if the interface in the mrtg configuration no longer exists you would get the error like above.

There is a mechanism for recreating the MRTG config without some of the interface types known to be dynamic outlined in the final post

https://support.nagios.com/forum/viewto ... 20#p187533
As a quick fix, we've simply removed the device and re-added it to XI. However, problem with that is you lose all the associated historical graphing data (which we need).
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: MRTG config check error

Post by scottwilkerson »

TBT wrote:As a quick fix, we've simply removed the device and re-added it to XI. However, problem with that is you lose all the associated historical graphing data (which we need).
As a quick thought you could grab the folder out of a backup for the device, should be in
/usr/local/nagios/share/perfdata/<host>

but I understand the frustration there
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked