I may be wrong here but i thought you had to point the check_mrtg to a rrd file and not the rrdtool log file.<br><br><br clear="all">Greg Pangrazio<br><a href="mailto:pangrazi@gmail.com" target="_blank">pangrazi@gmail.com</a><br>

<br><br>
<br><br><div class="gmail_quote">On Sun, Nov 15, 2009 at 8:24 PM, AJay <span dir="ltr"><<a href="mailto:ajay@wxsec.com" target="_blank">ajay@wxsec.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">


<div>Your mrtg is probably not working correctly, check you <font size="2">mrtg.cfg and /var/spool/mail/root to see what's going on with mrtg.</font></div>
<div> </div>
<div>
<div style="font-family: Arial Narrow; color: rgb(144, 144, 144); font-size: 12px;">------------------</div>
<div style="font-family: Verdana; color: rgb(0, 0, 0); font-size: 14px;">
<div>AJay</div></div></div>
<div></div>
<div></div>
<div> </div>
<div>
<div> </div>
<div> </div>
<div style="color: rgb(0, 0, 0);">
<div style="padding: 2px 0px; font-family: Arial Narrow; font-size: 12px;">------------------ Original ------------------</div>
<div style="font-size: 12px;">
<div><b>From: </b> "xmanhosting"<<a href="mailto:anthony@xmanhosting.com.au" target="_blank">anthony@xmanhosting.com.au</a>>;</div>
<div><b>Date: </b> Sat, Nov 14, 2009 12:27 PM</div>
<div><b>To: </b> "nagios-users"<<a href="mailto:nagios-users@lists.sourceforge.net" target="_blank">nagios-users@lists.sourceforge.net</a>>; </div>
<div></div>
<div><b>Subject: </b> [Nagios-users] Final stage of getting MRTG working with Nagios v2</div></div><div><div></div><div>
<div> </div>
<div><span><span><font size="2">Hello,</font></span></span></div>
<div><span><span><font size="2"></font></span></span> </div>
<div><span><font size="2">I have been fluffing around with Nagios for a couple of weeks, and have nearly finally nailed it.</font></span></div>
<div><span><font size="2"></font></span> </div>
<div><span><font size="2">I just have one thing to go.</font></span></div>
<div><span><font size="2"></font></span> </div>
<div><span><font size="2">I am trying to get MRTG to work with Nagios.</font></span></div>
<div><span><font size="2"></font></span> </div>
<div><span><font size="2">I have got MRGT working locally on my machine<span> , and can see it working by</span> going to these 2 sites <span> (locally)  </span>in a browser:</font></span></div>
<div><span><font size="2"></font></span> </div>
<div><span><font size="2"><a href="http://m33.mail.qq.com/cgi-bin/frame_html?sid=6AuAxsNrmrW1bmsg&r=31ef6d4e0997510a3066d059ab83e370#" target="_blank">file:///usr/local/mrtg-2/share/mrtg2/icons/index.html</a> and </font></span></div>



<div><span><font size="2"></font></span> </div>
<div><span><font size="2"><a href="http://m33.mail.qq.com/cgi-bin/frame_html?sid=6AuAxsNrmrW1bmsg&r=31ef6d4e0997510a3066d059ab83e370#" target="_blank">file:///usr/local/mrtg-2/share/mrtg2/icons/localhost_2.html</a></font></span></div>



<div><span><font size="2"></font></span> </div>
<div><span><font size="2">I followed the tutorial below to set up my router with Nagios:</font></span></div>
<div><span><font size="2"></font></span> </div>
<div><span><font size="2"><a href="http://www.thegeekstuff.com/2008/11/how-to-monitor-network-switch-and-ports-using-nagios/" target="_blank">http://www.thegeekstuff.com/2008/11/how-to-monitor-network-switch-and-ports-using-nagios/</a></font></span></div>



<div><span><font size="2"></font></span> </div>
<div><span><font size="2">however I am yet to get MRTG working with Nagios:</font></span></div>
<div><span><font size="2"></font></span> </div>
<div><span><font size="2" color="#ff0000">PING OK 11-14-2009 13:13:56 21d 16h 10m 13s 1/3 PING OK - Packet loss = 0%, RTA = 1.38 ms  </font></span></div>
<div><span><font size="2" color="#ff0000">Port 1 Bandwidth Usage UNKNOWN 11-14-2009 13:09:49 21d 16h 8m 43s 3/3 <b><font color="#000000">check_mrtgtraf: Unable to open MRTG log file</font></b>  </font></span></div>
<div><span><font size="2" color="#ff0000">Port 1 Link Status OK 11-14-2009 13:11:29 12d 22h 37m 5s 1/3 SNMP OK - up(1)  </font></span></div>
<div><span><font size="2" color="#ff0000">Uptime OK 11-14-2009 13:10:29 12d 22h 27m 57s 1/3 SNMP OK - Timeticks: (152738042) 17 days, 16:16:20.42</font></span></div>
<div><span><font size="2"></font></span> </div>
<div><span><font size="2">My switch.cfg currently has the following:</font></span></div>
<div><span><span lang="EN-AU"><font size="2"></font></span></span> </div>
<div><span><span lang="EN-AU"><font size="2" color="#ff0000"># Monitor bandwidth via MRTG logs</font></span></span></div>
<div><span><span lang="EN-AU"><font size="2"><font color="#ff0000">define service{<br>use     generic-service ; Inherit values from a template<br>host_name    Billion<br>service_description   Port 1 Bandwidth Usage<br>check_command    </font><font color="#000000"><b>check_local_mrtgtraf!/usr/local/mrtg-2/share/mrtg2/icons/localhost2.log!AVG!1000000,1000000!5000000,5000000!10</b></font></font></span></span></div>



<div><span><span lang="EN-AU"><font size="2" color="#ff0000">}</font></span></span></div>
<div><span><font size="2"></font></span> </div>
<div><span><table><tbody><tr><td></td></tr></tbody></table></span><span><font size="2">My localhost2.log is at the location above: <b>/usr/local/mrtg-2/share/mrtg2/icons/localhost2.log</b> ,however I still must have something wrong for it to not work.</font></span></div>



<div><span><font size="2"></font></span> </div>
<div><span><font size="2">When I run: /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg , it says: "<b>Things look okay - No serious problems were detected during the pre-flight check</b>"</font></span></div>



<div><span><font size="2"></font></span> </div>
<div><span><font size="2">When I run: /usr/local/mrtg-2/bin/mrtg /home/mrtg/cfg/mrtg.cfg , it says: </font></span></div>
<div><span><font size="2"></font></span> </div>
<div><span><font size="2">-----------------------------------------------------------------------<br>ERROR: Mrtg will most likely not work properly when the environment<br>       variable LANG is set to UTF-8. Please run mrtg in an environment<br>


       where this is not the case. Try the following command to start:</font></span></div>
<div> </div>
<div><span><font size="2">       env LANG=C /usr/local/mrtg-2/bin/mrtg /home/mrtg/cfg/mrtg.cfg <br>-----------------------------------------------------------------------<span> </span></font></span></div>
<div><span><font size="2"><span></span></font></span> </div>
<div><span><font size="2"><span>When I run: env LANG=C /usr/local/mrtg-2/bin/mrtg /home/mrtg/cfg/mrtg.cfg  , there are no errors. </span><br><span> </span></font></span></div>
<div><span><font size="2"><span>Does anyone know what I am still doing wrong</span></font></span></div>
<div><span><font size="2"><span></span></font></span> </div>
<div><span><font size="2"><span>Thanks for any help,</span></font></span></div>
<div><span><font size="2"><span></span></font></span> </div>
<div><span><font size="2"><span>Kind regards,</span></font></span></div>
<div><span><font size="2"><span>Anthony </span></font></span></div></div></div></div></div><br>------------------------------------------------------------------------------<br>
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day<br>
trial. Simplify your report design, integration and deployment - and focus on<br>
what you do best, core application coding. Discover what's new with<br>
Crystal Reports now.  <a href="http://p.sf.net/sfu/bobj-july" target="_blank">http://p.sf.net/sfu/bobj-july</a><br>_______________________________________________<br>
Nagios-users mailing list<br>
<a href="mailto:Nagios-users@lists.sourceforge.net" target="_blank">Nagios-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null<br></blockquote></div><br>