[mrtg] Re: How to make cfg file from comma separated file?

Daniel J McDonald dan.mcdonald at austinenergy.com
Tue Aug 12 14:48:00 MEST 2003


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