Page 1 of 1

MRTG config check error

Posted: Tue Apr 24, 2018 12:50 pm
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

Re: MRTG config check error

Posted: Tue Apr 24, 2018 1:03 pm
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

Re: MRTG config check error

Posted: Tue Apr 24, 2018 1:14 pm
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).

Re: MRTG config check error

Posted: Tue Apr 24, 2018 1:32 pm
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