<font size=2 face="Adobe Serif MM">Hey Keith,</font>
<br>
<br><font size=2 face="Adobe Serif MM">Here's just a thought, maybe point
you in the right direction...</font>
<br>
<br><font size=2 face="Adobe Serif MM">You could have your script take
say 4 separate arguments. One argument for each of the values you plan
to output, I </font>
<br><font size=2 face="Adobe Serif MM">think you said you are outputting
4 Values...?</font>
<br>
<br><font size=2 face="Adobe Serif MM">Then You would have 4 "sections"
in you .cfg File, one for each of the values the script outputs. Then for
each "Target:" </font>
<br><font size=2 face="Adobe Serif MM">line you would use that specific
argument to get that specific value...</font>
<br>
<br><font size=2 face="Adobe Serif MM">For Instance, let's say your script
(<i>call it "get_cpu-usage"</i>) is printing CPU-Usage and the
4 Values printed are:</font>
<br><font size=2 face="Adobe Serif MM"><b> Line
1 </b>==<b> </b>1-Min Avg</font>
<br><font size=2 face="Adobe Serif MM"><b> Line
2 </b>==<b> </b>5-Min Avg</font>
<br><font size=2 face="Adobe Serif MM"><b> Line
3 </b>==<b> </b>10-Min Avg</font>
<br><font size=2 face="Adobe Serif MM"><b> Line
4 </b>==<b> </b>1-Hour Avg</font>
<br>
<br><font size=2 face="Adobe Serif MM">So lets say that is what it prints
now <i>(above)</i>... Now what you can do is change the Script to print
<b>"ONLY 1 Value/ONLY 1 Line" </b>at a time.</font>
<br><font size=2 face="Adobe Serif MM">So to print the 1-Minute average
you call your script like this:</font>
<br><font size=2 face="Adobe Serif MM"> <i>/path/to/script/get_cpu-usage
1-Min</i></font>
<br>
<br><font size=2 face="Adobe Serif MM">Where "1-Min" is the argument
Passed...</font>
<br>
<br><font size=2 face="Adobe Serif MM">So for each of your sections in
the .cfg File, they would use one argument for each section's "Target:"
Line</font>
<br>
<br><font size=4 face="Adobe Serif MM"><b>So the cfg would look something
like these: </b></font><font size=2 face="Adobe Serif MM"><b><i>(*NOTICE
THE "argument" PASSED in BOLD)</i></b></font>
<br>
<br><font size=2 face="Adobe Serif MM"><b> "<u>Section
1 --- 1-Minute Average</u>":</b></font>
<br>
<br><font size=2 face="Adobe Serif MM">
<b>Target[</b><i>target_name</i><b>]:</b>
`<i>/path/to/script/get_cpu-usage <b>1-Min</i></b>`
<i>#*Backticks `` NOT
Single Quotes ''</i></font>
<br><font size=2 face="Adobe Serif MM"><i>
</i><b>Title[</b><i>target_name</i><b>]:</b>
CPU-Usage 1-Min Average</font>
<br><font size=2 face="Adobe Serif MM">
:....</font>
<br>
<br>
<br><font size=2 face="Adobe Serif MM"><b> "<u>Section
2 --- 5-Minute Average</u>":</b></font>
<br>
<br><font size=2 face="Adobe Serif MM">
<b>Target[</b><i>target_name</i><b>]:</b>
`<i>/path/to/script/get_cpu-usage <b>5-Min</i></b>`</font>
<br><font size=2 face="Adobe Serif MM"><i>
</i><b>Title[</b><i>target_name</i><b>]:</b>
CPU-Usage 1-Min Average</font>
<br><font size=2 face="Adobe Serif MM">
:....</font>
<br>
<br>
<br><font size=2 face="Adobe Serif MM"> <b><i>AND
SO ON.............</i></b></font>
<br>
<br>
<br><font size=2 face="Adobe Serif MM">Hope that helps...</font>
<br><font size=2 face="Adobe Serif MM">If I've confused you more, just
let me know and I'll try to explain a little better</font>
<br>
<br><font size=2 face="Adobe Serif MM">Thanks,</font>
<br><font size=2 face="Adobe Serif MM">Matt</font>
<br>
<br>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">From:
</font><font size=1 face="sans-serif">Keith <kwoody@citytel.net></font>
<br><font size=1 color=#5f5f5f face="sans-serif">To:
</font><font size=1 face="sans-serif"><mrtg@lists.oetiker.ch></font>
<br><font size=1 color=#5f5f5f face="sans-serif">Date:
</font><font size=1 face="sans-serif">01/02/2013 01:32 PM</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Subject:
</font><font size=1 face="sans-serif">[mrtg] Script
returns 4 values, Plot values via MRTG/routers2?</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Sent by:
</font><font size=1 face="sans-serif"><mrtg-bounces+mmartin=jwpepper.com@lists.oetiker.ch></font>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2><br>
Have a device that I cannot poll via SNMP for some values. I wrote<br>
a little expect/shell script to get me those values.<br>
<br>
I use small perl scripts to poll data and feed those into MRTG but<br>
those just return two values, which are used to build graphs and<br>
work just fine.<br>
<br>
The expect/shell script actually returns 4 integer values.<br>
I have read that it appears I can only use RRD and routers2 to be<br>
able to combine and display all 4 values on a graph.<br>
<br>
I have seen some examples of how others have done this, but the<br>
few I have seen are polling multiple devices and combining those into<br>
one graph.<br>
<br>
I am polling one device that returns 4 values.<br>
<br>
How can I create a .cfg file that can take those 4 values and create<br>
one graph?<br>
<br>
Thanks,<br>
Keith<br>
<br>
<br>
<br>
_______________________________________________<br>
mrtg mailing list<br>
mrtg@lists.oetiker.ch<br>
</font></tt><a href="https://lists.oetiker.ch/cgi-bin/listinfo/mrtg"><tt><font size=2>https://lists.oetiker.ch/cgi-bin/listinfo/mrtg</font></tt></a><tt><font size=2><br>
<br>
</font></tt>
<br>