[Xymon] monitoring UPS
Carl Inglis
Carl.Inglis at rakon.com
Wed Aug 14 09:47:32 CEST 2013
Hi John,
I found a BB4 script called "apcsnmp.pl" - http://communities.quest.com/docs/DOC-5576
It didn't take much tweaking to get it to report various conditions...
Hosts file:
xx.xx.xx.xx ups-host-name # volt apcload charge temp replace stest onbattery
This might do what you want?
Regards,
Carl
Carl Inglis
Systems Administrator
Rakon UK Limited
Dowsett House, Sadler Road, Lincoln LN6 3RS, United Kingdom
Tel: +44 (0)1522 812630 | Fax: +44 (0) 1522 812664 | Mob: +44 (0) 7786 552915
Carl.Inglis at rakon.com | www.rakon.com
THE QUEENS AWARDS FOR ENTERPRISE 2012
Rakon UK Ltd
This message together with any attachments contains confidential information and may be
subject to privilege. If you are not the intended recipient you may not distribute it in any
way, you must notify the sender immediately and delete any copies of the message along
with its attachments.
Rakon UK Ltd is a limited company registered in England and Wales.
Registered Office: Dowsett House, Sadler Road, Lincoln LN6 3RS
Company Registration Number: 5128090.
Please be aware that Rakon UK Limited may monitor email traffic data including the date, time, subject line, sender and recipients for the purposes of security and usage monitoring. Automated monitoring systems may also be applied to ascertain whether incoming/outgoing emails are likely to contain viruses, other destructive devices or inappropriate content.
-----Original Message-----
From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of John D. Alexander
Sent: 13 August 2013 16:04
To: xymon at xymon.com
Subject: Re: [Xymon] monitoring UPS
Hi Bill,
Thanks for the reply. Your scripts are clever. I may combine them into one script for ease of use.
I have individual pages for each ups (they are network connected SmartUPS 3000) and just ping tests right now. It would be best if the UPS data were to go in each UPS page. That seems to be a challenge - at least with my level of Xymon knowledge.
It would be useful to be able to initiate a custom test from hosts.cfg
Has anyone done something like this?
John Alexander
-----Original Message-----
From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of Bill Arlofski
Sent: Tuesday, August 13, 2013 5:05 AM
To: xymon at xymon.com
Subject: Re: [Xymon] monitoring UPS
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 -- _______________________________________________
Xymon mailing list
Xymon at xymon.com
http://lists.xymon.com/mailman/listinfo/xymon
_______________________________________________
Xymon mailing list
Xymon at xymon.com
http://lists.xymon.com/mailman/listinfo/xymon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ups-screen.png
Type: image/png
Size: 21936 bytes
Desc: ups-screen.png
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20130814/e83816a9/attachment.png>
More information about the Xymon
mailing list