Xymon Mailing List Archive search

monitoring UPS

8 messages in this thread

list John D. Alexander · Mon, 12 Aug 2013 23:59:10 +0000 ·
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?

Thanks.

John Alexander
Network Administrator
user-43e31ec8d822@xymon.invalid<mailto:user-43e31ec8d822@xymon.invalid>
Feeney Wireless, LLC  - PO Box 2549, Eugene, Oregon 97402
(Free) XXX-XXX-XXXX   (P) XXX-XXX-XXXX     (F) XXX-XXX-XXXX
www.feeneywireless.com<http://www.feeneywireless.com/>;
[http://shopping.netsuite.com/c.491803/site/signature_image.gif]
This email transmission is intended only for the addressee shown above. It may contain information that is privileged, confidential or otherwise protected from disclosure. Any review, dissemination or use of this transmission or its contents by persons other than the addressee is strictly prohibited! If you have received this email transmission in error please notify us immediately.
list Bill Arlofski · Tue, 13 Aug 2013 08:04:48 -0400 ·
quoted from John D. Alexander
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 --
list John D. Alexander · Tue, 13 Aug 2013 15:03:48 +0000 ·
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
quoted from Bill Arlofski


-----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 -- 
list W.J.M. Nelis · Wed, 14 Aug 2013 07:52:35 +0200 ·
Hello,
quoted from John D. Alexander

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.
.....
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?
We monitor a group of APC (smart)UPS-es using Devmon, thus using SNMP to 
retrieve the status information from the UPS. If using Devmon is an option, 
I can send you a template to monitor the UPS.

Kind regards,
   Wim Nelis.


******************************************************************************************************************

The NLR disclaimer is valid for NLR e-mail messages.

This message is only meant for providing information. Nothing in this e-mail message amounts to a contractual
or legal commitment on the part of the sender.
This message may contain information that is not intended for you. If you are not the addressee or if this
message was sent to you by mistake, you are requested to inform the sender and delete the message.
Sender accepts no liability for damage of any kind resulting from the risks inherent in the electronic
transmission of messages.
 
******************************************************************************************************************
list Andy Smith · Wed, 14 Aug 2013 07:22:44 +0100 ·
quoted from John D. Alexander

John D. Alexander wrote:
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/
I have a script which I wrote last year, it might be very specific to my   environment, but if you think it meets your needs and you wanted to give I can send you a copy.

################################################################################     This code scans hosts.cfg for entries marked with a 'ups' test and for each
# of these it will attempt to connect to the APC UPS using apcaccess
# to fetch the Attributes which it stores temporarily in
#
#    $XYMONTMP/${COLUMN}.${UPS}.run.${MyAPCDHost}.txt
#
# It will scan the output and create 'xymon' commands to populate a column (ups by default) for each entry.
#

The config file that it reads will look like so :-

[default]
     apcaccess=/sbin/apcaccess
     nisport=1234
     temperaturewarn=40
     batterychargewarn=90
     datacollection=LINEV,LOADPCT,BCHARGE,TIMELEFT,ITEMP,BATTV

[UPS-1]
     hostname=xxxxx

[UPS-2]
     hostname=yyyyy

[UPS-3]
     hostname=zzzzz
-- 
Andy
list Ryan Novosielski · Wed, 14 Aug 2013 02:32:51 -0400 ·
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
quoted from W.J.M. Nelis

On 08/14/2013 02:02 AM, W.J.M. Nelis wrote:
Hello,

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.
.....
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?
We monitor a group of APC (smart)UPS-es using Devmon, thus using SNMP to retrieve the status information from the UPS. If using Devmon is an option, I can send you a template to monitor the UPS.
I do this as well. It has been trouble free for the most part.

- --  ____*Note: UMDNJ is now Rutgers-Biomedical and Health Sciences*
 || \\UTGERS      |---------------------*O*---------------------
 ||_// Biomedical | Ryan Novosielski - Sr. Systems Programmer
 || \\ and Health | user-46c89e614701@xymon.invalid - 973/972.0922 (2x0922)
 ||  \\  Sciences | OIT/EI-Academic Svcs. - ADMC 450, Newark
      `'
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEARECAAYFAlILJI8ACgkQmb+gadEcsb7bewCdFMPt2k+qHQPIm9uICWHYpL0A
Xo4AoLlkUGrSyuGYWCt/l7lUOSIQVYoW
=rnON
-----END PGP SIGNATURE-----
list Carl Inglis · Wed, 14 Aug 2013 07:47:32 +0000 ·
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: +XX (X)XXXX XXXXXX | Fax: +XX (X) XXXX XXXXXX | Mob: +44 (0) 7786 552915
user-96685bdc864b@xymon.invalid | 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.
quoted from John D. Alexander
-----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 -- 
Attachments (1)
list John D. Alexander · Wed, 14 Aug 2013 18:53:21 +0000 ·
All,

The scripts that Bill Arlofski created were easily modified to do the trick.  The challenge was tweaking the RRD part to get it to work.  RRD seems to be really really finicky.

Right now they are launched via tasks.cfg, but I'm working on combining all the files into one.   The next major change will be to modify the interval.  RRD is the big challenge for that.  UPS really should be polled more than every 5 minutes.

Thanks to all for the suggestions.

John Alexander
quoted from Carl Inglis

-----Original Message-----
From: Carl Inglis [mailto:user-96685bdc864b@xymon.invalid] 
Sent: Wednesday, August 14, 2013 12:48 AM
To: John D. Alexander
Cc: xymon at xymon.com
Subject: RE: [Xymon] monitoring UPS

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: +XX (X)XXXX XXXXXX | Fax: +XX (X) XXXX XXXXXX | Mob: +44 (0) 7786 552915 user-96685bdc864b@xymon.invalid | www.rakon.com


THE QUEENS AWARDS FOR ENTERPRISE 2012
Rakon UK Ltd