View Single Post
Old 7th September 2010, 19:15
kheimbuch kheimbuch is offline
Junior Member
Join Date: Sep 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts

falko- No I had tried that already and it did not work... Thanks for the suggestion though.

Gads - This worked out for me as well. The only thing I had to do was modify some of the file location paths. Since I am monitoring multiple switches I had to modify some things.

Using the "env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg" command would not work for multiple switches. I had to change the output to look something like this "env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg_252.cfg". This was done for each switch so that I knew which output file to point the nagios check_mrtgtraf command to in the switch.cfg file.

I also had to make the appropriate change within the crontab file as well. Other wise it would not update that file and it would give the error "MRTG data has expired".

Only thing I have noticed is that the output files from mrtg only list ports that are listed as being up. Well I shouldn't say that, they are in the log file but are commented out so in nagios it will still show the error: "check_mrtgtraf: Unable to open MRTG log file". Once something is plugged into the port it will start reading the bandwidth once it refreshes.

Awesome job figuring this out gads.
Reply With Quote
Sponsored Links