[mrtg] Re: NON SNMP Graphing
Alex van den Bogaerdt
alex at slot.hollandcasino.nl
Thu Dec 16 09:49:15 MET 1999
Muhammad Masroor Akram wrote:
>
> Hello there....
>
> Can anynbody tell me, how can graph a text file.
> Actually my text file has 50 to 60 lines, i need MRTG to count those lines and graph it
> the text file resides on my local hard drive and it is being updated every 40 seconds.
> Can anybidy tell me the way out of this problem.
>
Read the file config.txt in the doc directory. Search for "external"
and for "gauge".
Write a script that returns the number of lines in your file, make sure
it has the correct format for mrtg as described in the config.txt file.
You don't write what your OS is so I have to assume it is linux:
Something like:
----cut here----
#!/bin/bash
LINES=`wc -l < myfile.txt`
echo $LINES
echo 0
uptime|sed 's/load average.*$//'
hostname
----cut here----
And then as target for mrtg:
----cut here----
Target[myfile]: `/the/full/path/to/above/script`
Options[myfile]: gauge,growright
----cut here----
with the usual other stuff.
HTH
--
__________________________________________________________________
/ alex at slot.hollandcasino.nl alex at ergens.op.het.net \
| work private |
| My employer is capable of speaking therefore I speak only for myself |
+----------------------------------------------------------------------+
--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:mrtg-request at list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/mrtg
More information about the mrtg
mailing list