[mrtg] Re: Comments getting us in trouble
Alex van den Bogaerdt
alex at slot.hollandcasino.nl
Sat Jan 5 01:14:20 MET 2002
Tuc wrote:
>
> >
> > There is a big difference between GPRINT and PRINT.
> > GPRINT prints in the Graph, PRINT justs prints.
> >
> > iow: the command I presented will cause the line to appear
> > in the web page.
> >
> Oh. Ok. Hrm, will have to look closer. If there is anyone out there
> with a sample of a call to "rrdtool graph" that uses PRINT I'd be interested
> in seeing it just to make sure I'm heading down the right path.
This is both an rrdtool question *and* an RTFM question so please
RTFM hereafter and post any remaining questions to the rrd-users
mailing list.
See http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/mailinglists.html
Quick rrdtool graph script, assuming datasources ds0 and ds1:
NOTE: UNTESTED (but may actually work) AND MAY NEED SOME TWEAKING
TO MATCH MRTG EXACTLY !!!
rrdtool graph image.png -A PNG --title "example image" \
--end now --start end-2000min --width 600 \
DEF:ds0=/var/rrdtool/customers/somecustomer.rrd:ds0:AVERAGE \
DEF:ds1=/var/rrdtool/customers/somecustomer.rrd:ds1:AVERAGE \
AREA:ds0#0000FF:"To the internet " \
GPRINT:ds0:MAX:"Max. %6.2lf %sB/s" \
GPRINT:ds0:AVERAGE:"Avg. %6.2lf %sB/s" \
GPRINT:ds0:MIN:"Min. %6.2lf %sB/s" \
GPRINT:ds0:LAST:"Cur. %6.2lf %sB/s\n" \
LINE1:ds1#00CC00:"From the internet" \
GPRINT:ds1:MAX:"Max. %6.2lf %sB/s" \
GPRINT:ds1:AVERAGE:"Avg. %6.2lf %sB/s" \
GPRINT:ds1:MIN:"Min. %6.2lf %sB/s" \
GPRINT:ds1:LAST:"Cur. %6.2lf %sB/s\n" \
PRINT:ds0:MAX:"<!-- maxin d %.0lf -->" \
PRINT:ds1:MAX:"<!-- maxout d %.0lf -->" \
PRINT:ds0:AVERAGE:"<!-- avin d %.0lf -->" \
PRINT:ds1:AVERAGE:"<!-- avout d %.0lf -->" \
PRINT:ds0:LAST:"<!-- cuin d %.0lf -->" \
PRINT:ds1:LAST:"<!-- cuout d %.0lf -->"
You *will* need to extend this script, it is just to get you
started. Also, it may be better to report to them by other
means (not in the web page).
Last but not least, if they want to check your reporting then IMHO
they should not rely on your numbers. Just a thought.
cheers
--
__________________________________________________________________
/ 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 |
+----------------------------------------------------------------------+
| Technical questions sent directly to me will be nuked. Use the list. |
+----------------------------------------------------------------------+
| http://faq.mrtg.org/ |
| http://rrdtool.eu.org --> tutorial |
+----------------------------------------------------------------------+
--
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