Final stage of getting MRTG working with Nagios

xmanhosting anthony at xmanhosting.com.au
Sat Nov 14 05:24:18 CET 2009


Hello,
 
I have been fluffing around with Nagios for a couple of weeks, and have
nearly finally nailed it.
 
I just have one thing to go.
 
I am trying to get MRTG to work with Nagios.
 
I have got MRGT working locally on my machine by going to these 2 sites in a
browser:
 
file:///usr/local/mrtg-2/share/mrtg2/icons/index.html and 
 
file:///usr/local/mrtg-2/share/mrtg2/icons/localhost_2.html
 
I followed the tutorial below to set up my router with Nagios:
 
http://www.thegeekstuff.com/2008/11/how-to-monitor-network-switch-and-ports-
using-nagios/
 
however I am yet to get MRTG working with Nagios:
 
PING OK 11-14-2009 13:13:56 21d 16h 10m 13s 1/3 PING OK - Packet loss = 0%,
RTA = 1.38 ms  
Port 1 Bandwidth Usage UNKNOWN 11-14-2009 13:09:49 21d 16h 8m 43s 3/3
check_mrtgtraf: Unable to open MRTG log file  
Port 1 Link Status OK 11-14-2009 13:11:29 12d 22h 37m 5s 1/3 SNMP OK - up(1)

Uptime OK 11-14-2009 13:10:29 12d 22h 27m 57s 1/3 SNMP OK - Timeticks:
(152738042) 17 days, 16:16:20.42
 
My switch.cfg currently has the following:
 
# Monitor bandwidth via MRTG logs
define service{
use     generic-service ; Inherit values from a template
host_name    Billion
service_description   Port 1 Bandwidth Usage
check_command
check_local_mrtgtraf!/usr/local/mrtg-2/share/mrtg2/icons/localhost2.log!AVG!
1000000,1000000!5000000,5000000!10
}
 
	
My localhost2.log is at the location above:
/usr/local/mrtg-2/share/mrtg2/icons/localhost2.log ,however I still must
have something wrong for it to not work.
 
When I run: /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
, it says: "Things look okay - No serious problems were detected during the
pre-flight check"
 
When I run: /usr/local/mrtg-2/bin/mrtg /home/mrtg/cfg/mrtg.cfg , it says: 
 
 
If you have any other questions or comments, please do not hesitate to
contact me at any time.

Kind regards,
Anthony.

__________________________________________ 

Anthony Exeter 
xmanhosting 
PO Box 691 | Innaloo | WA | 6918 | F: 08 6270 4407 
Email  <outbind://16/anthony@xmanhosting.com.au> anthony at xmanhosting.com.au
We value your feedback:
Please review our services, or provide comments here
<http://www.xmanhosting.com.au/review-our-services/> 
  <http://www.swishdesign.com.au/xman/footer.gif> 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20091114/12ba7753/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: footer.gif
Type: image/gif
Size: 5394 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20091114/12ba7753/attachment.gif>
-------------- next part --------------
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list