Xymon Mailing List Archive search

New UPS monitor added to Xymonton

list Josh Luthman
Wed, 28 Jul 2010 23:40:19 -0400
Message-Id: <user-119482f4ea37@xymon.invalid>

Good catch, thank you!  Updated hobbitgraph.cfg and image...

http://imgur.com/N3pd5.png

[in-voltage]
        TITLE Input AC Voltage
        YAXIS VAC
        DEF:FIRSTUPS=in-voltage.rrd:FIRSTUPS:AVERAGE
        DEF:SECONDUPS=in-voltage.rrd:SECONDUPS:AVERAGE
        DEF:THIRDUPS=in-voltage.rrd:THIRDUPS:AVERAGE
        LINE1.5:FIRSTUPS#00CCCC:FIRSTUPS
        LINE1.5:SECONDUPS#CC0000:SECONDUPS
        LINE1.5:THIRDUPS#FFFF00:THIRDUPS
        COMMENT:\n
        GPRINT:FIRSTUPS:LAST: FIRSTUPS \: %5.1lf%s (cur)
        GPRINT:FIRSTUPS:MAX: \: %5.1lf%s (max)
        GPRINT:FIRSTUPS:MIN: \: %5.1lf%s (min)
        GPRINT:FIRSTUPS:AVERAGE: \: %5.1lf%s (avg)\n
        GPRINT:SECONDUPS:LAST: SECONDUPS \: %5.1lf%s (cur)
        GPRINT:SECONDUPS:MAX: \: %5.1lf%s (max)
        GPRINT:SECONDUPS:MIN: \: %5.1lf%s (min)
        GPRINT:SECONDUPS:AVERAGE: \: %5.1lf%s (avg)\n
        GPRINT:THIRDUPS:LAST: THIRDUPS \: %5.1lf%s (cur)
        GPRINT:THIRDUPS:MAX: \: %5.1lf%s (max)
        GPRINT:THIRDUPS:MIN: \: %5.1lf%s (min)
        GPRINT:THIRDUPS:AVERAGE: \: %5.1lf%s (avg)\n


Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX


On Wed, Jul 28, 2010 at 10:50 PM, Ralph Mitchell
<user-00a5e44c48c0@xymon.invalid> wrote:
Did you mean to have all three DEFS the same rrd/variable:
       DEF:FIRSTUPS=in-voltage.rrd:FIRSTUPS:AVERAGE
       DEF:SECONDUPS=in-voltage.rrd:FIRSTUPS:AVERAGE
       DEF:THIRDUPS=in-voltage.rrd:FIRSTUPS:AVERAGE
You can also put the LINE lines in between the GPRINTs so that the colored
dots show up in the same line as the appropriate cur/min/max/avg values.
Ralph Mitchell

On Wed, Jul 28, 2010 at 10:37 PM, Josh Luthman <user-4c45a83f15cb@xymon.invalid>
wrote:
I find this works quite well for me.  Notice the smaller line size the
farther down it goes - this enables you to actually see the bigger
lines above (behind) the others.

Also note that the LINE is not being commented at the end but is a
identifying a hex color.

http://imgur.com/33K2w.png

[in-voltage]
       TITLE Input AC Voltage
       YAXIS VAC
       DEF:FIRSTUPS=in-voltage.rrd:FIRSTUPS:AVERAGE
       DEF:SECONDUPS=in-voltage.rrd:FIRSTUPS:AVERAGE
       DEF:THIRDUPS=in-voltage.rrd:FIRSTUPS:AVERAGE
       LINE6.5:FIRSTUPS#00CCCC:FIRSTUPS
       LINE3.5:SECONDUPS#CC0000:SECONDUPS
       LINE1.5:THIRDUPS#FFFF00:THIRDUPS
       COMMENT:\n
       GPRINT:FIRSTUPS:LAST: FIRSTUPS \: %5.1lf%s (cur)
       GPRINT:FIRSTUPS:MAX: \: %5.1lf%s (max)
       GPRINT:FIRSTUPS:MIN: \: %5.1lf%s (min)
       GPRINT:FIRSTUPS:AVERAGE: \: %5.1lf%s (avg)\n
       GPRINT:SECONDUPS:LAST: SECONDUPS \: %5.1lf%s (cur)
       GPRINT:SECONDUPS:MAX: \: %5.1lf%s (max)
       GPRINT:SECONDUPS:MIN: \: %5.1lf%s (min)
       GPRINT:SECONDUPS:AVERAGE: \: %5.1lf%s (avg)\n
       GPRINT:THIRDUPS:LAST: THIRDUPS \: %5.1lf%s (cur)
       GPRINT:THIRDUPS:MAX: \: %5.1lf%s (max)
       GPRINT:THIRDUPS:MIN: \: %5.1lf%s (min)
       GPRINT:THIRDUPS:AVERAGE: \: %5.1lf%s (avg)\n

Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX


On Wed, Jul 28, 2010 at 7:39 PM, Josh Luthman
<user-4c45a83f15cb@xymon.invalid> wrote:
I see!  Would be nice to have an example or place to document this in
more
detail.  Could we start a public Xymon Wiki for these kinds of things?

I believe I have it correct - three DEF, LINE and GPRINT lines (note
that
they are being escaped with \ ) for three UPS units.  I'm not certain as
the
data is all at 120v at the moment.

Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX


On Wed, Jul 28, 2010 at 6:20 PM, Ralph Mitchell
<user-00a5e44c48c0@xymon.invalid>
wrote:
You mean like this extract from hobbitgraph.cfg??
     [users]
             TITLE Users and Processes
             YAXIS #
             DEF:p=procs.rrd:la:AVERAGE
             DEF:u=users.rrd:la:AVERAGE
             AREA:p#00CC00:Processes
             LINE1:u#000099:Users
Multiple DEFs with as many rrds as you like...  :)
Ralph Mitchell

On Wed, Jul 28, 2010 at 2:59 PM, Josh Luthman
<user-4c45a83f15cb@xymon.invalid> wrote:
Never mind, missing the name of my UPS on hobbitgraphs.

How does one put multiple UPS on a single graph, though?  I'm looking
at the disk statement and I don't see where a second rrd file comes in
to play.  Is it necessary for one graph to load from one rrd file?

Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX


On Wed, Jul 28, 2010 at 2:41 PM, Josh Luthman
<user-4c45a83f15cb@xymon.invalid> wrote:
I am having an issue with the graphs.  Is it possible the RRD was
created without supporting of two decimal places?

They are being referenced on their pages but the image does not show
up.  The RRD files exist and do have values:

-> rrdtool dump out-voltage.rrd |grep "name\|type\|last_ds"
               <name> 111111111</name>
               <type> GAUGE </type>
               <last_ds> 119.00 </last_ds>
               <name> 222222222</name>
               <type> GAUGE </type>
               <last_ds> 121.00 </last_ds>
               <name> 33333333333</name>
               <type> GAUGE </type>
               <last_ds> 120.00 </last_ds>


Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX


On Wed, Jul 28, 2010 at 12:59 PM, Josh Luthman
<user-4c45a83f15cb@xymon.invalid> wrote:
That fixed it!  Thank you!

Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX


On Wed, Jul 28, 2010 at 12:46 PM, Bill Arlofski
<user-0b8af203a56e@xymon.invalid>
wrote:
On 07/28/10 12:29, Josh Luthman wrote:
 >Unless I am mistaken, the test I wrote will be set the status
to
yellow if
the
UPS load is greater than or equal to $yellowtest (80%) and the
status
will
be
set to red if the UPS load is eualto or greater than $redtest
(80%).
While this may be your intention that is not what I'm seeing.  I
am
getting
a red condition with these loads.

- UPS load % for apcxxxxxr01 apcyyyy01 apczzzzzzzzz01 on
127.0.0.1

apcxxxxxx01 : 51.00
apcyyyy01 : 11.00
apczzzzzzzz01 : 12.00

My yellow and red are 80 and 90 like you suggest (or at least
your
default
is =)

-> cat ~myhobbituser/server/ext/xymon_nut_ups-load.sh|grep test
datatest="ups\.load:"
yellowtest="80"
redtest="90"

Josh Luthman

Ah... I see it...

Your UPS reports load % with two decimal points (51.00), mine
reports
%
load
with one (35.6)

So the logic in the script is correct, but the part where I was
stripping
past
the decimal failed to take into account more than one decimal.

By only stripping the decimal and one numeral past it, the test is
saying
"if
510 > 90 then set the status to red"


To fix it, change the line:

datanopoint=`echo "$data" | "$SED" -e 's/\.[0-9]//'`

to

datanopoint=`echo "$data" | "$SED" -e 's/\.[0-9]\{1,2\}//'`


P.S. I already made all the changes I mentioned in may last email
and
will
be
putting up the simplified versions possibly later today, including
this
fix.


Thanks Josh

--
Bill Arlofski
Reverse Polarity, LLC