[mrtg] Get a graph from an external source
Stefano Giraldo
stefano at neotokyo3.it
Wed Jul 14 17:45:35 MEST 2004
Hi,
I'm trying to get a graph from the output of script.
My script cat_rw take a value from a router,
as wrote on manual MRTG need only one value
to generate a graph, so my script output is only
one value.
This is what i put in mrtg.cfg file:
Include: /etc/script_mrtg/template.mrtg
And this is template.mrtg:
Target[router_name]: `/etc/script_mrtg/cat_rw.sh`
AbsMax[router_name]: 1000000
MaxBytes[router_name]: 500
WithPeak[router_name]: ymw
Options[router_name]: growright, gauge, absolute
ShortLegend[router_name]: Load
YLegend[router_name]: Load
Title[router_name]: Load
PageTop[router_name]: <H1>Load</H1>
<TABLE>
<TR><TD>System:</TD><TD>router_name</TD></TR>
<TR><TD><FONT COLOR="#00FF00">In</FONT>:</TD><TD>Load 0</TD></TR>
<TR><TD><FONT COLOR="#0000FF">Out</FONT>:</TD><TD>Load 1</TD></TR>
</TABLE>
And cat_rw script give values near this:
137246
Now, when I restart MRTG it give theese errors:
Immediatly after the restart:
WARNING: Problem with External get '/etc/script_mrtg/cat_rw':
Expected a Number for 'out' but nothing'
And after the processing of all router interfaces under monitoring:
ERROR: Target[router_name][_OUT_] ' $$target[156]{$mode} ' did not eval into
defined data
WARNING: Skipping Update of router_name, outlast is not defined
Someone know why?
And why MRTG ask me for two values (IN and OUT)
when Tobi wrote that only one value is needed?
Thank's a lot for any suggestions.
Bye,
Ste.
-----
Stefano Giraldo
I.NET S.p.A. - Operations Department
Via Darwin, 85 20019 Settimo Milanese (MI), Italy
-----
--
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