From the support page:
http://support.nagios.com/wiki/index.ph ... _Displayed
•Make sure none of the mrtg.cfg entries are using SNMP v2c. Older verions of the Switch Wizard called mrtg with arguments for SNMPv2c, which MRTG does not use. Open up /etc/mrtg/mrtg.cfg and look for
Target[
www.hostaddress.com]: 1:
[email protected]:::::1
Notice that after the multitude of colons, there is a 1, this represents the SNMP version MRTG will use to poll the device. If this is instead 2c, change it to 2 and save the file. This will need to be done to every metric that is affected by being created with 2c.
I have the following in my file
Code: Select all
[root@localhost mrtg]# cat mrtg.cfg
######################################################################
# Multi Router Traffic Grapher -- Example Configuration File
######################################################################
# This file is for use with mrtg-2.0
#
# Note:
#
# * Keywords must start at the begin of a line.
#
# * Lines which follow a keyword line which do start
# with a blank are appended to the keyword line
#
# * Empty Lines are ignored
#
# * Lines starting with a # sign are comments.
# Where should the logfiles, and webpages be created?
# Minimal mrtg.cfg
#--------------------
HtmlDir: /var/www/mrtg
ImageDir: /var/www/mrtg
LogFormat: rrdtool
LogDir: /var/lib/mrtg
ThreshDir: /var/lib/mrtg
WorkDir: /var/lib/mrtg
Include: conf.d/*.cfg
Forks: 4
I do not have Target[
www.hostaddress.com]: 1:
[email protected]:::::1 in this file. But in each of the *.cfg files in the /conf.d/ sub folder there appears to be that line. Once again not all of my hosts are listed in the conf.d subfolder. Only the routers in the conf.d subfolder have the ::::::2 value at the end all of the switch IP .cfg files have no value
[root@localhost conf.d]# grep -i 'target' 192.168.3.4.cfg
Target[192.168.3.4_1]: 1:
[email protected]:
Target[192.168.3.4_2]: 2:
[email protected]:
Target[192.168.3.4_3]: 3:
[email protected]:
Target[192.168.3.4_4]: 4:
[email protected]:
# Target[192.168.3.4_5]: 5:
[email protected]:
Target[192.168.3.4_6]: 6:
[email protected]:
# Target[192.168.3.4_7]: 7:
[email protected]:
Target[192.168.3.4_8]: 8:
[email protected]:
Target[192.168.3.4_9]: 9:
[email protected]:
Target[192.168.3.4_10]: 10:
[email protected]:
Target[192.168.3.4_11]: 11:
[email protected]:
Target[192.168.3.4_12]: 12:
[email protected]:
Target[192.168.3.4_13]: 13:
[email protected]:
# Target[192.168.3.4_14]: 14:
[email protected]:
Target[192.168.3.4_15]: 15:
[email protected]:
Target[192.168.3.4_16]: 16:
[email protected]:
Target[192.168.3.4_17]: 17:
[email protected]:
Target[192.168.3.4_18]: 18:
[email protected]:
Target[192.168.3.4_19]: 19:
[email protected]:
Target[192.168.3.4_20]: 20:
[email protected]:
Target[192.168.3.4_21]: 21:
[email protected]:
Target[192.168.3.4_22]: 22:
[email protected]:
Target[192.168.3.4_23]: 23:
[email protected]:
# Target[192.168.3.4_24]: 24:
[email protected]:
# Target[192.168.3.4_25]: 25:
[email protected]:
Target[192.168.3.4_26]: 26:
[email protected]:
Target[192.168.3.4_27]: 27:
[email protected]:
Target[192.168.3.4_28]: 28:
[email protected]:
However, when I use the current wizard for switch and router it defaults to SNMPv2c - Is it possible that these older configuration used an invalid SNMP string and my mrtg data has not been collecting for some time?