we found by chance that our graphs for routers and switches were not working after 4 days.
I found out by the logs that the problem occurred since we applied a new configuration wizard where we were adding a new interface to be monitored.
Googling the problem we found out the below string which returned the error "contains duplicate definition".
Code: Select all
env LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok
ERROR: Line 245 (Target[10.63.255.3_7]: 7:[email protected]:161::::2) in CFG file (/etc/mrtg/conf.d/10.63.255.3.cfg)
contains a duplicate definition for target[10.63.255.3_7].
First definition is on line 4
Code: Select all
SNMPGET Problem for ifHCInOctets.1 ifHCOutOctets.1 on [email protected]:::::2:v4only: No response from remote host "10.61.64.5" at /usr/bin/../lib/mrtg2/Net_SNMP_util.pm line 594.
Net_SNMP_util::snmpget('[email protected]:::::2:v4only', 'HASH(0x38ec898)', 'ifHCInOctets.1', 'ifHCOutOctets.1') called at /usr/bin/mrtg line 2330
main::getsnmparg('HASH(0x180f640)', 'HASH(0x38f03b8)', 'HASH(0x1704510)', 'HASH(0x1baac30)') called at /usr/bin/mrtg line 2510
main::readtargets('HASH(0x180f640)', 'ARRAY(0x189a428)', 'HASH(0x1704510)') called at /usr/bin/mrtg line 403
main::main called at /usr/bin/mrtg line 143
2019-01-28 17:34:12: WARNING: skipping because at least the query for ifHCInOctets.1 on 10.61.64.5 did not succeed
2019-01-28 17:34:12: WARNING: no data for ifHCInOctets&ifHCOutOctets:[email protected]. Skipping further queries for Host 10.61.64.5 in this round.
SNMPGET Problem for ifHCInOctets.2 ifHCOutOctets.2 on [email protected]:::::2:v4only: No response from remote host "62.161.55.129" at /usr/bin/../lib/mrtg2/Net_SNMP_util.pm line 594.
Net_SNMP_util::snmpget('[email protected]:::::2:v4only', 'HASH(0x33ad120)', 'ifHCInOctets.2', 'ifHCOutOctets.2') called at /usr/bin/mrtg line 2330
main::getsnmparg('HASH(0x180f640)', 'HASH(0x33afc70)', 'HASH(0x1704510)', 'HASH(0x1baac30)') called at /usr/bin/mrtg line 2510
main::readtargets('HASH(0x180f640)', 'ARRAY(0x189a428)', 'HASH(0x1704510)') called at /usr/bin/mrtg line 403
main::main called at /usr/bin/mrtg line 143
2019-01-28 17:34:12: WARNING: skipping because at least the query for ifHCInOctets.2 on 62.161.55.129 did not succeed
2019-01-28 17:34:12: WARNING: no data for ifHCInOctets&ifHCOutOctets:[email protected]. Skipping further queries for Host 62.161.55.129 in this round.
2019-01-28 17:34:12: WARNING: Skipping host chlugbi5 as it does not resolve to an IPv4 address
2019-01-28 17:34:12: WARNING: no data for ifHCInOctets&ifHCOutOctets:trap@chlugbi5. Skipping further queries for Host chlugbi5 in this round.
2019-01-28 17:34:12: WARNING: Expected a number but got 'noSuchInstance'
Why a duplicate definition was written during the wizard configuration with no notice about the error and we had to found it by chance?
Where the right configuration is now taken after the cfg deletion?
How to fix dozens of errors found by the mrtg probably due to the obsolete cfg files that coming from the old configuration?
How we can avoid that it happens again?
Thanks for your support