[mrtg] Re: script question
Jerl
jerl.simpson at joplin.com
Fri Jul 13 15:53:34 MEST 2001
I did find some more useful information just after sending the post.
Sorry about that.
I have modified my cfg file in the way that follows this message. I
added absolute,gauge,integer and nopercent to the options.
I also modified my script to output 4 lines:
Line 1 number of modems in use.
Line 2 number of modems NOT in use.
Line 3 uptime of the device.
Line 4 Desciprtion of the device.
If I run the script from the command line it outputs the following:
255
274
89
USR Rack
all on separate lines.
thanks for the help
#---------------------------------------------------------------
Target[mdm-use]: '/root/mrtgconfigs/usage.pl'
Title[mdm-use]: Modems in Use
Options[mdm-use]: nopercent, integer,absolute,gauge
MaxBytes[mdm-use]: 529
PageTop[mdm-use]: <H1>Joplin Modem Usage</H1>
Ylegend[mdm-use]: Active Modems
ShortLegend[mdm-use]: Modems
Legend1[mdm-use]: Current Active Modems
Legend3[mdm-use]: 5 minute Average Active Modems
LegendI[mdm-use]: Modems
#---------------------------------------------------------------
"Albinati, Luis Martin" wrote:
>
> does your script return a counter-like (incremental) integer value? or an
> absolute (current status) integer value of the modem usage? because mrtg by
> default assumes that returned values are incremental, so if your script
> returns a current status value you need to add the options 'gauge' and
> 'absolute' in your cfg file. This way mrtg will treat your values as current
> status values and not counter.
> Check: http://people.ee.ethz.ch/~oetiker/webtools/mrtg/reference.html for
> more detailed information, sections: External Monitoring Scripts and Options
>
> Greetings,
> Luis
>
> Luis Martin Albinati
> N.O.C.
> Prima S.A. - Argentina
> Ciudad Internet / Datamarkets
> Phone #: (54)11-4370-0024
> E-Mail: albo at prima.com.ar <mailto:albo at prima.com.ar>
>
> -----Original Message-----
> From: Jerl [mailto:jerl.simpson at joplin.com]
> Sent: Jueves, 12 de Julio de 2001 09:47 AM
> To: Mrtg
> Subject: [mrtg] script question
>
> I was wondering if someone could help me with a problem using an
> external script.
>
> I have put together a bash script that uses snmpwalk to gather some info
> on a USRTotal Control System. And a perl script that actually uses the
> bash file. The perl outputs an integer that I want to keep track of in
> an MRTG graph.
> I have set up the mrtg.cfg file to look like this:
>
> Target[mdm-use]: '/pathto/mrtgconfigs/usage.pl'
> Title[mdm-use]: Modems in Use
> MaxBytes[mdm-use]: 529
> PageTop[mdm-use]: <H1> Modem Usage
> </H1>
> <TABLE>
> <TR><TD>System:</TD><TD>USR Rack</TD></TR>
> <TR><TD>Maintainer:</TD><TD></TD></TR>
> <TR><TD>Interface:</TD><TD>All modems</TD></TR>
> <TR><TD>Max Users:</TD>
> <TD>529</TD></TR>
> </TABLE>
>
> When I run usage.pl it gives the output I want (which is a single
> integer ie. 273), but the log files never change when I run it in MRTG.
>
> Any help is greatly appreciated.
>
> Jerl
>
> --
> 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
>
> --
> 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
--
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