[Xymon] monitoring UPS

Bill Arlofski waa-hobbitml at revpol.com
Tue Aug 13 14:04:48 CEST 2013


On 08/12/13 19:59, John D. Alexander wrote:
> I installed NUT and the set of scripts from revpol.com.  They work as
> advertised, but I’m looking to have the data displayed on the page for the
> respective UPS – rather than the Xymon server.
> 
> Any thoughts or hints?


Hi John The Xymon NUT scripts page on our website sees a lot of activity. Glad
to know that they are actively in use in the wild.  :)


The tests are reported back to the Xymon server as the machine that is running
the test.

You can simply override the $MACHINE variable at the end of the script like so:


$BB $BBDISP "status $MACHINE.$COLUMN $COLOR `"$DATE"`

change to:

$BB $BBDISP "status ups-a.$COLUMN $COLOR `"$DATE"`

Or set MACHINE="ups-a" at the top of the script where the other variables are
assigned.

I am also wondering if you can set an environment variable explicitly in the
tasks.cfg file by doing something like so:

CMD MACHINE="ups-a"; export ups-a; $XYMONHOME/ext/xymon_nut_ups-status.sh

If this syntax works, then you could leave the scripts unmodified and have
just one set for any number of UPSes being tested. Never tried that though.


Then, in the UPS sub page section of the hosts file:

subpage example-com_upses UPSes
title Example Dot Com UPSes
group-only ups-status|in-voltage|out-voltage|ups-load|bat-charge|bat-voltage
0.0.0.0 ups-a.example.com # CLIENT:ups-a noconn


Funny thing is, I always wanted to do exactly that same thing but never spent
the time to look into it. Your questions prompted me to spend the 20 minutes
to test this and verify that it does indeed also "work as advertised." :)

Maybe I will even find the time to update the website with this new
information. :)

Hope this helps!

--
Bill Arlofski
Reverse Polarity, LLC
http://www.revpol.com/
-- Not responsible for anything below this line --



More information about the Xymon mailing list