Page 1 of 1

Using MRTG to monitor the performance on DELL switch

Posted: Fri May 17, 2013 2:50 pm
by NagiosNewbis
Hi;

I am configuring the MRTG to monitor the performance of my DELL 3348 switch, after configured the MRTG on my Nagios Core server and running it with the following command.

/usr/local/mrtg-2/bin/cfgmaker --global 'WorkDir: /home/httpd/mrtg' --global 'Options[_]: bits,growright' --output /home/mrtg/cfg/mrtg.cfg snmp_community_name@ip_addr_of_monitored_switch

/usr/local/mrtg-2/bin/indexmaker --output=/var/www/mrtg/index.html /home/mrtg/cfg/mrtg.cfg

env LANG=C /usr/local/mrtg-2/bin/mrtg /home/mrtg/cfg/mrtg.cfg

then, I checked my /var/www/mrtg folder and open the index.html file on browser, I can see the link liked below but I do not see other files on my server such as 172.16.3.278_9-day.png.

How can I find those files and how can I integrate them to my Nagios config file to show them on Nagios site?

<tr>
<td><DIV><B>Traffic Analysis for 9 -- </B></DIV>
<DIV><A HREF="172.16.3.247_9.html"><IMG BORDER=1 ALT="172.16.3.247_9 Traffic Graph" SRC="172.16.3.247_9-day.png"></A><BR>
<SMALL><!--#flastmod file="172.16.3.247_9.html" --></SMALL></DIV>
</td><td><DIV><B>Traffic Analysis for 12 -- </B></DIV>
<DIV><A HREF="172.16.3.247_12.html"><IMG BORDER=1 ALT="172.16.3.247_12 Traffic Graph" SRC="172.16.3.247_12-day.png"></A><$
<SMALL><!--#flastmod file="172.16.3.247_12.html" --></SMALL></DIV>
</td></tr>

Re: Using MRTG to monitor the performance on DELL switch

Posted: Fri May 17, 2013 3:39 pm
by sreinhardt
Well to find them using the find or locate commands are your best bet.

Code: Select all

find "172.16.3.278_9-day.png" /
locate 172.16.3.278_9-day.png
However this sounds like it may be an issue with mrtg not getting the correct oid for the dell switch, and therefore not generating the rrd and png files.

Re: Using MRTG to monitor the performance on DELL switch

Posted: Fri May 17, 2013 5:38 pm
by NagiosNewbis
I found it under /home/httpd/mrtg folder, also I found those .log files either. I forgot to check my mrtg.cfg file in which I assigned "WorkDir: /home/httpd/mrtg" in file.

In my Nagios config file for the switch, I have this configured

define service{
use generic-service ; Inherit values from a template
host_name dell-sw-247
service_description Port 50 Bandwidth Usage
check_command check_mrtgtraf!/home/httpd/mrtg/172.16.3.247_50.log!AVG!1000000,1000000!5000000,5000000!10
}

But when I click on the service from Nagios webpage, I saw this error

"check_mrtgtraf: Unable to open MRTG log file"

can someone tell me why?

Re: Using MRTG to monitor the performance on DELL switch

Posted: Sat May 18, 2013 5:33 pm
by NagiosNewbis
I can browse the traffic analyze page from this link on server (file:///home//httpd/mrtg/172.16.3.247_49.html), but I cannot do it from my workstation using http://172.16.3.247/mrtg, any idea? But I can use http://172.16.3.247/nagios to see my Nagios page.

Re: Using MRTG to monitor the performance on DELL switch

Posted: Mon May 20, 2013 10:56 am
by scottwilkerson
you likely need to create an apache config that looks something like this

Code: Select all

#
# This configuration file maps the mrtg output (generated daily)
# into the URL space.  By default these results are only accessible
# from the local host.
#
Alias /mrtg /home/httpd/mrtg

<Location /mrtg>
    Order allow,deny
    Allow from all
</Location>
Then restart apache

Re: Using MRTG to monitor the performance on DELL switch

Posted: Tue May 21, 2013 5:03 pm
by NagiosNewbis
thx! got it.

Re: Using MRTG to monitor the performance on DELL switch

Posted: Wed May 22, 2013 11:24 am
by slansing
Thanks for letting us know what the resolution was!