[mrtg] Re: Problems importing from comma separated file?

Berry mrtg at infotrade.se
Thu Aug 14 18:04:54 MEST 2003


Hi again and thanks for the help Daniel,
Thanks to Tim at Netlatency.com they added now support for MRTG and 
freespace can now produce MRTG friendly output ie
7057422848
129931478272
n/a
c:

It can also produce the following
100
33.05
n/a
c:

ie in percentage format which is great!

If the drive is not available (which is the case for some of my 
logical drives which not always are mounted) the output is ´0´ 
instead of the bytecount.

However, I still have some problems to import this info to MRTG:

For percentage format everything works fine.
I use the following .cfg-file:

YLegend[p424disk-c2]: % Disk Usage
WithPeak[p424disk-c2]: ymw
Options[p424disk-c2]: gauge, noborder, nobanner, nopercent
Target[p424disk-c2]: `c:\mrtg\bin\freespace -p c:`
MaxBytes[p424disk-c2]: 100
Unscaled[P424disk-c2]: ymwd
Weekformat[P424disk-c2]: V
Title[p424disk-c2]: Disk Usage C, Total and Free %
ShortLegend[p424disk-c2]: %
Legend1[p424disk-c2]: Total
Legend2[p424disk-c2]: Free
Legend3[p424disk-c2]: Maximal 5 Minute
Legend4[p424disk-c2]: Maximal 5 Minute
LegendI[p424disk-c2]: Total
LegendO[p424disk-c2]: Free
PageTop[p424disk-c2]: <H1>Disk Usage C, Total and Free %</H1>

...which produce the following output:
http://berndt.hybner.com/stat/p424disk-c2.html

Thats all fine neh? :-)

The problem is with bytes available.... I get nothing, my graphs 
stays empty!  
When I check the .log-file it imports the values produced by 
Freespace but only on the first line, the new value when MRTG runs 
the next time replaces the old one on the first line of the log file 
but all other lines stays ´0´ forever.. 
See http://berndt.hybner.com/stat/p424disk-c3.html
http://berndt.hybner.com/stat/p424disk-c3.log

I use the following .cfg-file:
YLegend[p424disk-c3]: Bytes Disk Usage
WithPeak[p424disk-c3]: ymw
Options[p424disk-c3]: gauge, noborder, nobanner
Target[p424disk-c3]: `c:\mrtg\bin\freespace -m c:`
MaxBytes[p424disk-c3]: 120031478272
Unscaled[P424disk-c3]: ymwd
Weekformat[P424disk-c3]: V
Title[p424disk-c3]: Disk Usage C, Total and Free bytes
ShortLegend[p424disk-c3]: bytes
Legend1[p424disk-c3]: Total
Legend2[p424disk-c3]: Free
Legend3[p424disk-c3]: Maximal 5 Minute
Legend4[p424disk-c3]: Maximal 5 Minute
LegendI[p424disk-c3]: Total
LegendO[p424disk-c3]: Free
PageTop[p424disk-c3]: <H1>Disk Usage C, Total and Free bytes</H1>

I had the same problem with several other info collected with W2K 
Performence monitor (thats the reason I went with Freespace) but I 
figured that was a M$ problem but now I don't think so anymore....

What is really weird is that for one of my four logical drives It 
works "half". Checkout http://berndt.hybner.com/stat/p424disk-f3.html 

Anybody have an idea where to start looking for the problem...?

Blue skies
Berry



Subject:        	[mrtg] Re: How to make cfg file from comma separated file?
From:           	Daniel J McDonald <dan.mcdonald at austinenergy.com>
To:             	Berry <mrtg at infotrade.se>
Copies to:      	mrtg <mrtg at list.ee.ethz.ch>
Organization:   	Austin Energy
Date sent:      	12 Aug 2003 07:48:00 -0500

> On Mon, 2003-08-11 at 17:54, Berry wrote:
> > Hello, 
> > This is probably a newbie question but as I have not found an answer
> > in the documentation or mailinglist archive (please feel free to
> > correct me if I am mistaken) I am taking the liberty to post.
> 
> That's fine.  The salient portion of the manual is
> http://people.ee.ethz.ch/~oetiker/webtools/mrtg/reference.html
> under the TARGET syntax, under the rubrick "External Monitoring
> Scripts".
> 
> > 
> > I would like to use the FreeSpace utility from Netlatency ( 
> > http://www.netlatency.com/utilities.html ) to monitor disk usage on
> > different drives. This command-line tool produce an output in the
> > following format:
> > 
> > 8/11/2003,11:10:55 PM,c:,120031478272,7057422848,5.88%
> > 
> > i.e. date,time,drive letter,total bytes,available bytes,available
> > percent
> > 
> > Assuming I schedule Freespace to provide this data to MRTG, how can
> > I have MRTG build graphs from this information/How should the .cfg
> > look like?
> you would need to break that into 4 lines, e.g.
> 
> 7057422848
> 129931478272
> 8/11/2003,11:10:55 PM
> C:
> 
> 
> Let's say you have a script called "splitit.pl" that generates those
> four lines.  You would then make your target say something like:
> 
> target[drive_c]: `splitit.pl`
> 
> Note the use of backticks.  Note also that you will want to use
> absolute paths for the script.
> 
> Anyway, that should get you started.
> -- 
> Daniel J McDonald, CCIE 2495, CNX
> Austin Energy
> 
> 
> --
> Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
> Archive     http://www.ee.ethz.ch/~slist/mrtg FAQ        
> http://faq.mrtg.org    Homepage     http://www.mrtg.org WebAdmin   
> http://www.ee.ethz.ch/~slist/lsg2.cgi
> 
> 



--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list