[mrtg] Re: Temperature graphing problem from MEASURE UPS!

Mike Holley mholley at deltacontrols.com
Sun Nov 7 08:08:09 MET 1999


I am using Linux 6.0, and the utility that is returning the value "gauge:21"
is Linux's native snmpget and snmpwalk. I do have the OID specified twice in
the MRTG.CFG, as I do realize that it needs both an in and out OID to check
as the program was originally intended for traffic analysis only. I guess I
will have to simply write a script to deal with this issue of removing the
non-integer characters. Are there any helpful pointers, or resources that
you could point towards as I have never had to write a perl script before.

Thanks for the help,
MH
----- Original Message -----
From: Alex van den Bogaerdt <alex at slot.hollandcasino.nl>
To: Mike Holley- <mholley at deltacontrols.com>
Cc: MRTG users <mrtg at list.ee.ethz.ch>
Sent: Saturday, November 06, 1999 4:57 PM
Subject: Re: [mrtg] Temperature graphing problem from MEASURE UPS!


> Mike Holley- wrote:
> >
> > Hi there,
> >
> > I am using MRTG in conjunction with a MEASURE UPS II slot card in one of
our
> > APC UPS's to graph the temperature of our server room, but I am having a
bit
> > of a problem. The OID that returns the temperature value does not return
a
> > simple integer, it returns for example "Gauge : 21" when the temperature
is
> > 21 degrees Celsius. Is there anyway to have MRTG ignore the text in
front of
> > the integer value, or do I have to use some other program to strip out
the
> > characters before the integer? In case your wondering, the OID that I am
> > using to get the temperature information is 1.3.6.1.4.1.318.1.1.2.1.1.0,
> > this is part of APC's enterprise MIB declaration.
> >
>
> Are you sure it is the device that returns a string "Gauge : 21"?  Could
> it not be an SNMP program that gets the gauge value "21" and represents
> it to you the way you describe?
>
> First check it from withing MRTG.  If MRTG complains, write a script
> that fetches the value and process it using that script.  You don't
> write what OS you're using so you may need to modify the following:
>
>    snmpget ups1 public \
>          .1.3.6.1.4.1.318.1.1.2.1.1.0 \
>          .1.3.6.1.4.1.318.1.1.2.1.1.0 | awk '{print $4}'
>    echo quite some time
>    echo ups1
>
> Come to think of it: you need to use two OIDs.  In most cases you can
> just use the same OID twice if you only want to read one variable.
> This is also true when specifying them inside the MRTG config file!
> If you already knew this: sorry; else: rtfm.
> --
>    __________________________________________________________________
>  / 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 |
> +----------------------------------------------------------------------+
>

--
* To unsubscribe from the mrtg mailing list, send a message with the
  subject: unsubscribe to mrtg-request at list.ee.ethz.ch
* The mailing list archive is at http://www.ee.ethz.ch/~slist/mrtg


More information about the mrtg mailing list