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>
Using MRTG to monitor the performance on DELL switch
-
NagiosNewbis
- Posts: 24
- Joined: Thu May 02, 2013 5:13 pm
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Using MRTG to monitor the performance on DELL switch
Well to find them using the find or locate commands are your best bet. 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.
Code: Select all
find "172.16.3.278_9-day.png" /
locate 172.16.3.278_9-day.pngNagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
-
NagiosNewbis
- Posts: 24
- Joined: Thu May 02, 2013 5:13 pm
Re: Using MRTG to monitor the performance on DELL switch
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?
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?
-
NagiosNewbis
- Posts: 24
- Joined: Thu May 02, 2013 5:13 pm
Re: Using MRTG to monitor the performance on DELL switch
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.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Using MRTG to monitor the performance on DELL switch
you likely need to create an apache config that looks something like this
Then restart apache
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>-
NagiosNewbis
- Posts: 24
- Joined: Thu May 02, 2013 5:13 pm
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Using MRTG to monitor the performance on DELL switch
Thanks for letting us know what the resolution was!