[mrtg] Re: Problem with graphs stays empty

Berry mrtg at infotrade.se
Thu Aug 28 21:06:38 MEST 2003


Hello everybody,
Two weeks ago I posted a mail regarding graphs that stays empty when 
importing values. At that time when I checked the log-file for the 
graph, all values was on the first line in the log file, the rest was 
zeroes. (The mail I posted is below). 

Now I have found what the problem was. It seems that MRTG can not 
handle the big values that I imported. For example, monitoring one of 
my harddrives with freespace.exe gives me the following output

13030923264
120031478272
n/a
d:

First line is free space and second is total space, ie about 13 GB 
free of about 120 GB. 
I had this running for two weeks (producing empty graphs) without 
changing anything. When I almost ran out of disk space the other day 
the graph suddenly started to appear (when around 2 GB free space). 
Later, when I made more space available, the problem returned (the 
graph does not update although the correct value - 13030923264 - is 
at the first line in the .log-file. (The value stays at the first 
line all the time).

>From what I understand this must be a problem in MRTG and not the 
.cfg-file. I have tried several different option in the .cfg-file 
including setting the MaxByte option a lot higher. 

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

The graphs are at http://berndt.hybner.com/stat/p424disk-d3.html
The log file is at http://berndt.hybner.com/stat/p424disk-d3.log

I am running MRTG 2.9.25

Blue skies
berry



From:           	"Berry" <mrtg at infotrade.se>
To:             	mrtg at list.ee.ethz.ch
Date sent:      	Thu, 14 Aug 2003 18:04:54 +0200
Subject:        	[mrtg] Re: Problems importing from comma separated file?
Priority:       	normal

> 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



More information about the mrtg mailing list