[Nagiosplug-devel] MRTG Graf

Israel Brewster israel at frontierflying.com
Mon May 12 23:08:37 CEST 2008


On May 11, 2008, at 9:55 PM, Devinder Singh wrote:

> Hello
>
> I managed to run the mrtg.log file but i still can tview the Graphs
>
> Nagios says the data is outdated.
>
> MRTG data has expired (20176157 minutes old)

Which means either a) MRTG is still not running properly, or b) your  
Nagios command isn't looking at the proper log files, in this case  
something like /home/mrtg/210.19.228.81_1.log My suspicion would be  
with a.

> I have a crontab -e command line as :
>
> #AVGSCAN-GUI
> 0 8 * * 5 (FILENAME=/root/.avg7/testresults/testreport.`date  +\ 
> %s`; /opt/grisoft/avg7/bin/avgscan -report $FILENAME  /|| mv  
> $FILENAME $FILENAME.)
> */5 * * * *  /usr/bin/mrtg /home/mrtg/cfg/mrtg1.cfg --logging /var/ 
> log/mrtg1.log
> ~

Ok, that looks reasonable.

>
> this is a potion of mrtg1.log

Nope, that's your mrtg1.cfg file, not your mrtg1.log. But that's  
probably what you meant :). To figure out what's going on, however, it  
would be helpful to see your /var/log/mrtg1.log file. Your .cfg file,  
as shown below, looks fine to me. Also, have you tried just running "/ 
usr/bin/mrtg /home/mrtg/cfg/mrtg1.cfg" on the command line? What does  
that spit out? Also, as I've mentioned before, until you have MRTG  
working on its own, without Nagios, you might get better results on  
the MRTG board. When you have MRTG working, you should see the log  
files located in /home/mrtg (in your case) being updated every 5  
minutes, and if you have everything set up to do so, you should be  
able to see the mrtg graphs directly.

-----------------------------------------------
Israel Brewster
Computer Support Technician
Frontier Flying Service Inc.
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7250 x293
-----------------------------------------------
>
> ### Global Defaults
>
> #  to get bits instead of bytes and graphs growing to the right
> # Options[_]: growright, bits
>
> EnableIPv6: no
> WorkDir: /home/mrtg
> Options[_]: bits,growright
>
> ######################################################################
> # System: SilterraKL.yourdomain.com
> # Description: Cisco IOS Software, 2800 Software (C2800NM-IPBASE-M),  
> Version 12.4(3i), RELEASE SOFTWARE (fc2)
> #          Technical Support: http://www.cisco.com/techsupport
> #          Copyright (c) 1986-2007 by Cisco Systems, Inc.
> #          Compiled Wed 28-Nov-07 21:09 by stshen
> # Contact:
> # Location:
> ######################################################################
>
>
> ### Interface 1 >> Descr: 'FastEthernet0/0' | Name: 'Fa0/0' | Ip:  
> '210.19.228.81' | Eth: '30-78-30-30-31-65-66-37-36-30-36-38-35-38' ###
>
> Target[210.19.228.81_1]: 1:public at 210.19.228.81:
> SetEnv[210.19.228.81_1]: MRTG_INT_IP="210.19.228.81"  
> MRTG_INT_DESCR="FastEthernet0/0"
> MaxBytes[210.19.228.81_1]: 12500000
> Title[210.19.228.81_1]: Traffic Analysis for 1 --  
> SilterraKL.yourdomain.com
> PageTop[210.19.228.81_1]: <h1>Traffic Analysis for 1 --  
> SilterraKL.yourdomain.com</h1>
>                 <div id="sysdetails">
>                         <table>
>                                 <tr>
>                                         <td>System:</td>
>                                          
> <td>SilterraKL.yourdomain.com in </td>
>                                 </tr>
>                                 <tr>
>                                         <td>Maintainer:</td>
>                                         <td></td>
>                                 </tr>
>                                 <tr>
>                                         <td>Description:</td>
>                                         <td>FastEthernet0/0 $ETH-LAN$ 
> $ETH-SW-LAUNCH$$INTF-INFO-FE 0/0$ </td>
>                                 </tr>
>                                 <tr>
>                                         <td>ifType:</td>
>                                         <td>ethernetCsmacd (6)</td>
>                                 </tr>
>                                 <tr>
>                                         <td>ifName:</td>
>                                         <td>Fa0/0</td>
>                                 </tr>
>                                 <tr>
>                                         <td>Max Speed:</td>
>                                         <td>100.0 Mbits/s</td>
>                                 </tr>
>
>
>
>
> What am i missing from here. I need to view bandwidth stats on the  
> Router.
>
> Ragards,
> Devinder
>
>
>
> 2008/4/30 Devinder Singh <devinbhullar at gmail.com>:
>
> Hi
>
> I have problems in getting bandwidth statistics using MRTG.
>
> define service{
>         use                          generic-service ; Inherit  
> values from a template
>         host_name               D-Link
>         service_description   Port 1 Bandwidth Usage
>         check_command       check_local_mrtgtraf!/home/mrtg/cfg/ 
> mrtg.cfg!AVG!1000000,1000000!5000000,5000000!10
> }
>
> I tried to run the above command and see the file is outdated.
>
> i have ran the cfgmaker program and stored the mrtg.cfg in /home/ 
> mrtg/cfg/mrtg.cfg
>
> Please advise
>
> -- 
> Devinder
>
>
>
> -- 
> Devinder  
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save  
> $100.
> Use priority code J8TL2D2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone_______________________________________________________
> Nagios Plugin Development Mailing List Nagiosplug-devel at lists.sourceforge.net
> Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
> ::: Please include plugins version (-v) and OS when reporting any  
> issue.
> ::: Messages without supporting info will risk being sent to /dev/null

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nagios-plugins.org/archive/devel/attachments/20080512/f6a0063a/attachment.html>


More information about the Devel mailing list