I haven't looked into the mailing list very closely in the past. From what I know, we're still using "Hobbit", right?
I'm looking at getting a full suit of new UPS units and I would like to see what everyone is using out there. I would really like to find something that works well with Hobbit so I can monitor them as easy as possible. I will need to have Hobbit go red when power is down (batteries discharging) is really my main concern here. More details would be prettier, though =)
Thanks in advance!
Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373
Those who don't understand UNIX are condemned to reinvent it, poorly. --- Henry Spencer
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Well, I use Devmon for monitoring our UPS. It is working very well! If your UPS is not an APC, try to use the APC templates, or write a new one for your vendor.
Regards
Maik
- ---------1---------2---------3---------4---------5---------6--☆-----7 Heinelt Maik ハイネルト マイク 愛知県一宮市富士2−2−22 株式会社 ベガシステムズ TEL 0586−71−3903 FAX 0586−71−4071 Skype ID: daliose
Josh Luthman wrote:
I haven't looked into the mailing list very closely in the past. From what I know, we're still using "Hobbit", right?
I'm looking at getting a full suit of new UPS units and I would like to see what everyone is using out there. I would really like to find something that works well with Hobbit so I can monitor them as easy as possible. I will need to have Hobbit go red when power is down (batteries discharging) is really my main concern here. More details would be prettier, though =)
Thanks in advance!
Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373
Those who don't understand UNIX are condemned to reinvent it, poorly. --- Henry Spencer
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD4DBQFI0JlUr4r+EhimPOURAn0IAJi/qH+FrRoUVuC5Gxx+ePTzjZgSAJwL3baK lRxIglqSQiu8QKO3b7Bzkg== =RbFZ -----END PGP SIGNATURE-----
I don't have Devmon installed and I would, if at all possible, prefer to avoid SNMP.
Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373
Those who don't understand UNIX are condemned to reinvent it, poorly. --- Henry Spencer
2008/9/17 Heinelt Maik <maik at vegasystems.com>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Well, I use Devmon for monitoring our UPS. It is working very well! If your UPS is not an APC, try to use the APC templates, or write a new one for your vendor.
Regards
Maik
- ---------1---------2---------3---------4---------5---------6--☆-----7 Heinelt Maik ハイネルト マイク 愛知県一宮市富士2−2−22 株式会社 ベガシステムズ TEL 0586−71−3903 FAX 0586−71−4071 Skype ID: daliose
Josh Luthman wrote:
I haven't looked into the mailing list very closely in the past. From what I know, we're still using "Hobbit", right?
I'm looking at getting a full suit of new UPS units and I would like to see what everyone is using out there. I would really like to find something that works well with Hobbit so I can monitor them as easy as possible. I will need to have Hobbit go red when power is down (batteries discharging) is really my main concern here. More details would be prettier, though =)
Thanks in advance!
Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373
Those who don't understand UNIX are condemned to reinvent it, poorly. --- Henry Spencer
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD4DBQFI0JlUr4r+EhimPOURAn0IAJi/qH+FrRoUVuC5Gxx+ePTzjZgSAJwL3baK lRxIglqSQiu8QKO3b7Bzkg== =RbFZ -----END PGP SIGNATURE-----
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
Hi Josh
I created something to monitor a UPS, then wrote another one to do more. They are for the MGE Galaxy range.
The first version used wget to pull out the status web page, and then parsed the output to get at the info we wanted. The next version used a lot of snmpgets to pull out the info we wanted. It's really ugly, involved a lot of hard-coding, but it worked. It also graphed the charge level and the output load.
I will speak to my client and ask them if I can release the code. (Under the terms of my contract, all code I write on their time is their intellectual property)
Regards Vernon
From: Josh Luthman [mailto:josh at imaginenetworksllc.com] Sent: Wednesday, 17 September 2008 9:03 PM To: hobbit at hswn.dk Subject: Re: [hobbit] UPS units
I don't have Devmon installed and I would, if at all possible, prefer to avoid SNMP.
Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373
Those who don't understand UNIX are condemned to reinvent it, poorly. --- Henry Spencer
2008/9/17 Heinelt Maik <maik at vegasystems.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Well, I use Devmon for monitoring our UPS.
It is working very well!
If your UPS is not an APC, try to use the APC templates, or write a
new one for your vendor.
Regards
Maik
- --
- ---------1---------2---------3---------4---------5---------6--☆-----7
Heinelt Maik
ハイネルト マイク
愛知県一宮市富士2−2−22
株式会社 ベガシステムズ
TEL 0586−71−3903
FAX 0586−71−4071
Skype ID: daliose
Josh Luthman wrote:
> I haven't looked into the mailing list very closely in the past.
> From what I know, we're still using "Hobbit", right?
>
> I'm looking at getting a full suit of new UPS units and I would like
> to see what everyone is using out there. I would really like to
> find something that works well with Hobbit so I can monitor them as
> easy as possible. I will need to have Hobbit go red when power is
> down (batteries discharging) is really my main concern here. More
> details would be prettier, though =)
>
> Thanks in advance!
>
> Josh Luthman
> Office: 937-552-2340
> Direct: 937-552-2343
> 1100 Wayne St
> Suite 1337
> Troy, OH 45373
>
> Those who don't understand UNIX are condemned to reinvent it, poorly.
> --- Henry Spencer
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD4DBQFI0JlUr4r+EhimPOURAn0IAJi/qH+FrRoUVuC5Gxx+ePTzjZgSAJwL3baK
lRxIglqSQiu8QKO3b7Bzkg==
=RbFZ
-----END PGP SIGNATURE-----
To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe at hswn.dk
NOTICE: This email and any attachments are confidential. They may contain legally privileged information or copyright material. You must not read, copy, use or disclose them without authorisation. If you are not an intended recipient, please contact us at once by return email and then delete both messages and all attachments.
Hi
Has anybody got anything to keep an eye on IronPort kit? Will probably have to script something myself, but if I don't have to, even better.
Regards Vernon
NOTICE: This email and any attachments are confidential. They may contain legally privileged information or copyright material. You must not read, copy, use or disclose them without authorisation. If you are not an intended recipient, please contact us at once by return email and then delete both messages and all attachments.
Ironports have a web management page. It should be a simple task to wget from there with a script and get the data of interest, like from a bb tier server.
Dave Shiels
623-878-7762 primary 623-521-4272 mobile
From: Everett, Vernon [mailto:Vernon.Everett at woodside.com.au] Sent: Wednesday, September 17, 2008 7:04 AM To: hobbit at hswn.dk Subject: [hobbit] IronPort
Hi
Has anybody got anything to keep an eye on IronPort kit?
Will probably have to script something myself, but if I don't have to, even better.
Regards
Vernon
NOTICE: This email and any attachments are confidential. They may contain legally privileged information or copyright material. You must not read, copy, use or disclose them without authorisation. If you are not an intended recipient, please contact us at once by return email and then delete both messages and all attachments.
I was thinking of designing one myself, but my work load got wait too big for me to accomplish this. But, as a good direction to get started if you are talking about the IronPort ESA, http://<YourIronportURLHere>/xml/status<http://%3cYourIronportURLHere%3e/xml/status>. you need to supply credentials first to see the information, but it's nice to have.
Jason Chambers IT Help Desk Associate
GEOSOFT INC. freedom to explore T +1 416.369.0111 #344 F +1 416.369.9599
Visit our site at www.geosoft.com
From: Everett, Vernon [mailto:Vernon.Everett at woodside.com.au] Sent: September-17-08 10:04 AM To: hobbit at hswn.dk Subject: [hobbit] IronPort
Hi
Has anybody got anything to keep an eye on IronPort kit? Will probably have to script something myself, but if I don't have to, even better.
Regards Vernon
NOTICE: This email and any attachments are confidential.
They may contain legally privileged information or
copyright material. You must not read, copy, use or
disclose them without authorisation. If you are not an
intended recipient, please contact us at once by return
email and then delete both messages and all attachments.
On Wednesday 17 September 2008 16:04:14 Everett, Vernon wrote:
Hi
Has anybody got anything to keep an eye on IronPort kit? Will probably have to script something myself, but if I don't have to,
I added a devmon template for IronPort to the devmon subversion a few months ago. The next release of the devmon templates will include it, but it's easy enough to pull it out of svn.
http://devmon.svn.sourceforge.net/viewvc/devmon/trunk/templates/ironport- asyncos/
Unfortunately, there are some minor issues with how the SNMP agent on the Ironport was implemented: -The perCentCPUUtilization value is quite erratic (seems to be an immediate value, not an averaged value), so we see it spike up to 90% or more at times when the average according to the graph is about 50%. I will try and add averaged values in the devmon template ... -I think in the case of a disk failure, the entire branch goes missing, so the test will go clear, with the message 'Missing repeater data for primary OID raidID'
Regards, Buchan
On Wed, 2008-09-17 at 09:02 -0400, Josh Luthman wrote:
I don't have Devmon installed and I would, if at all possible, prefer to avoid SNMP.
We use Liebert/Emmerson UPS here, (GXT2, NPower, and NFinity) and I monitor about 130 UPS. I use MRTG, configured with a template, to poll the boxes. bbmrtg.pl imports the data into hobbit. I am alarmed on:
- Load on battery
- UPS switched to Bypass
- Battery less than 60 minutes (yellow) or 30 minutes (red)
- Current draw within 10% of rated max
- Input voltage more than 15% below nominal (brown-out) or 15% above nominal.
- frequency off by more than 1Hz
- UPS inaccessible (ping)
I can't fathom a way to monitor that without snmp.
-- Daniel J McDonald, CCIE #2495, CISSP #78281, CNX Austin Energy http://www.austinenergy.com
Josh Luthman wrote:
I haven't looked into the mailing list very closely in the past. From what I know, we're still using "Hobbit", right?
I'm looking at getting a full suit of new UPS units and I would like to see what everyone is using out there. I would really like to find something that works well with Hobbit so I can monitor them as easy as possible. I will need to have Hobbit go red when power is down (batteries discharging) is really my main concern here. More details would be prettier, though =)
Thanks in advance!
Hi Josh...
I have been using NUT (Network Ups Tools - http://eu1.networkupstools.org/ ) to monitor some APC UPSes. NUT is an excellent client/server UPS monitoring tool that allows you to automate the shutdown of multiple servers using AC power from one UPS when the battery is getting low. It can monitor many types of UPSes, and its client-server construction makes it well-suited to be monitored by other tools like hobbit, for instance.
I have created several hobbit client scripts to pull information from the NUT server. These scripts are monitoring and graphing the following stats from (currently) two UPSes at one of my client's sites:
bat-charge % ups-load % in-voltage out-voltage bat-voltage
I have been planning (for quite some time now) to get these things cleaned up and get them on the shire so everyone can make use of them. I have been far too busy though... I have a few projects coming to a close and may have time in the coming weeks to get these up there.
Let me take a quick look at my scripts in their current state. Perhaps if they look reasonable enough, and some people are interested, I may just post them here with minimal instructions before I get a completed package ready for the shire.
The only pre-requisite to deploying my scripts is that NUT is currently installed, running properly and monitoring at least one of your UPSes.
Let me know if this is of interest. I am looking to give back to the hobbit community and this might be a perfect chance. :)
-- Bill Arlofski Reverse Polarity, LLC 860-965-5110 Cell http://www.revpol.com/
- Stop the NSA from illegally eavesdropping on your personal email * Learn about PGP and start encrypting your email today http://gnupg.org or http://www.pgp.com
Hi guys,
I have the hobbit page up and running but when i click on disk for example, which takes me to http://hobbit.metsi.com/hobbit-cgi/bb-hostsvc.sh?HOST=hobbit.metsi.com&S ERVICE=bbd
i get an http 404 error. I might have done something wrong in the installation. Please advise.
Thanks
Thanks in advance for your input. Much appreciated. I look forward to reading your scripts!
I will not be wanting to shut my servers down, but instead switch them over to generators rather then the AC power. The generators we have at each site are not good/smart enough to take in AC power and kick on when it drops, unfortunately.
Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373
Those who don't understand UNIX are condemned to reinvent it, poorly. --- Henry Spencer
On Wed, Sep 17, 2008 at 12:13 PM, Bill Arlofski <waa-hobbitml at revpol.com>wrote:
Josh Luthman wrote:
I haven't looked into the mailing list very closely in the past. From what I know, we're still using "Hobbit", right?
I'm looking at getting a full suit of new UPS units and I would like to see what everyone is using out there. I would really like to find something that works well with Hobbit so I can monitor them as easy as possible. I will need to have Hobbit go red when power is down (batteries discharging) is really my main concern here. More details would be prettier, though =)
Thanks in advance!
Hi Josh...
I have been using NUT (Network Ups Tools - http://eu1.networkupstools.org/) to monitor some APC UPSes. NUT is an excellent client/server UPS monitoring tool that allows you to automate the shutdown of multiple servers using AC power from one UPS when the battery is getting low. It can monitor many types of UPSes, and its client-server construction makes it well-suited to be monitored by other tools like hobbit, for instance.
I have created several hobbit client scripts to pull information from the NUT server. These scripts are monitoring and graphing the following stats from (currently) two UPSes at one of my client's sites:
bat-charge % ups-load % in-voltage out-voltage bat-voltage
I have been planning (for quite some time now) to get these things cleaned up and get them on the shire so everyone can make use of them. I have been far too busy though... I have a few projects coming to a close and may have time in the coming weeks to get these up there.
Let me take a quick look at my scripts in their current state. Perhaps if they look reasonable enough, and some people are interested, I may just post them here with minimal instructions before I get a completed package ready for the shire.
The only pre-requisite to deploying my scripts is that NUT is currently installed, running properly and monitoring at least one of your UPSes.
Let me know if this is of interest. I am looking to give back to the hobbit community and this might be a perfect chance. :)
-- Bill Arlofski Reverse Polarity, LLC 860-965-5110 Cell http://www.revpol.com/
- Stop the NSA from illegally eavesdropping on your personal email * Learn about PGP and start encrypting your email today http://gnupg.org or http://www.pgp.com
To unsubscribe from the hobbit list, send an e-mail to hobbit-unsubscribe at hswn.dk
Hi Josh
Here they are, for what they are worth. Please note
- These are probably the ugliest scripts I have written in years. I acknowledge that, and accept that. They both started as a "Gee! Let's see if this works" and grew from there. A horrible way to code.
- I make no claims regarding fitness for purpose or correctness
- They are to be used at your own risk. (Standard disclaimer of liability applies)
- They were written to monitor 2 different Models of the MGE Galaxy range of UPS - they may work on others. YMMV.
- The scripts, particularly the second one, illustrates my complete ignorance of SNMP. Please do not judge me on that. :-)
The script runs on the server, and polls the UPS devices, so there needs to be a route to the UPS. The one talks to the device on port 80, pulling the data from the web console. The other uses snmp on the appropriate ports. Make sure adequate firewall rules are in place.
The SNMP script uses the ksh string handling tools, which are unique to ksh (and possibly bash) Do not try and run this in sh - it will not work.
Have fun.
Cheers V
In bb-hosts you need an entry like this IP_Address Host_name # status_web_interface ups UPS_type 1.2.3.4 galaxy3000 # http://1.2.3.4/ups_prop.htm <http://1.2.3.4/ups_prop.htm> ups galaxy3000 COMMENT:"Level 3 UPS" The keyword ups is important, because the script scans bb-hosts to pull out the ups entries. (I said it was ugly) There is a UPS_type entry, because I was planning to upscale it for more UPS types, but never got mych further than the Galaxy range.
Changes to hobbitserver.cfg To TEST2RRD, add "ups=ncv" To GRAPHS, add "ups" Also add following variable NCV_ups="Load:GAUGE,Charge:GAUGE"
Add the following to hobbitgraph.cfg [ups] TITLE UPS Charge YAXIS Power -u 100 -l 0 DEF:u=ups.rrd:Charge:AVERAGE DEF:p=ups.rrd:Load:AVERAGE LINE2:u#00CC00:Charge LINE2:p#0000FF:Load COMMENT:\n GPRINT:u:LAST:Charge \: %5.1lf%s (cur) GPRINT:u:MAX: \: %5.1lf%s (max) GPRINT:u:MIN: \: %5.1lf%s (min) GPRINT:u:AVERAGE: \: %5.1lf%s (avg)\n GPRINT:p:LAST:Load \: %5.1lf%s (cur) GPRINT:p:MAX: \: %5.1lf%s (max) GPRINT:p:MIN: \: %5.1lf%s (min) GPRINT:p:AVERAGE: \: %5.1lf%s (avg)\n
On the server Add the following to hobbitlaunch.cfg [ups] ENVFILE /usr/lib/hobbit/server/etc/hobbitserver.cfg NEEDS hobbitd CMD $BBHOME/ext/ups.ksh LOGFILE $BBSERVERLOGS/ups.log INTERVAL 5m
The wget script
#!/bin/ksh
set -x
COLOUR=green
DATE=$(date)
SPACER="
"
OUT=$BBTMP/upspage
grep " ups " $BBHOSTS | grep -v "^page" | while read IP UPSNAME HASH URL
UPS TYPE OTHER
do
cat $UPSNAME
case $TYPE in
galaxy3000)
PAGE="$IP/ups_prop.htm"
wget -O $OUT ${PAGE} > /dev/null
echo > $OUT.tmp
cat $OUT | sed -e :a -e 's/<[^>]*>//g;/</N;//ba' |
sed 's/^[ \t]*//;s/[ \t]*$//' |
grep -v ^$ | grep -v "()" |
sed -e :a -e '/:$/N; s/:\n/~ /; ta' |
egrep -v "^Help|^About|^Master|^ " |
sed 's/\ /:/g' |
sed -e :a -e '/:$/N; s/:\n/ /; ta' |
sed 's/Last update ~/\nLast update ~/g' |
uniq
>> $OUT.tmp
#Assign a colour
#FORMAT OUTPUT
grep -v "~" $OUT.tmp > $OUT.final
echo >> $OUT.final
grep "~" $OUT.tmp | while read a
do
LEN=$(echo "$a" | cut -d"~" -f1 | wc -c)
((FIL=30-LEN))
FILLER="${SPACER:1:$FIL}"
echo "$a" | sed "s/~/$FILLER/g" >> $OUT.final
done
echo '<FONT COLOR="Black">' >> $OUT.final
cat $OUT.tmp | egrep "Battery charge level|Output load level"
|
sed 's/Battery charge level/Charge=/g' |
sed 's/Output load level/Load=/g' |
sed 's/%//g' | sed 's/~//g' |
sed 's/[ \t]*//g' >> $OUT.final
echo '</FONT>' >> $OUT.final
;;
esac
$BB $BBDISP "status $UPSNAME.ups $COLOUR $DATE $(cat $OUT.final)"
rm $OUT.tmp $OUT.final $OUT
done
The script using SNMP - rename as appropriate. #!/bin/ksh DATE=$(date) #set -x SPACER=" " BBTMP=/tmp #BBHOSTS=/etc/hobbit/bb-hosts #OUT=$BBTMP/upspage grep " ups " $BBHOSTS | grep -v "^page" | while read IP UPSNAME HASH URL UPS TYPE OTHER do
echo $IP $UPSNAME
Do a single ping to make sure there is something there.
ping -c1 $IP > /dev/null # This might be different in other versions of Unix if [ $? -eq 0 ] then COLOUR=green case $TYPE in galaxy3000) > $OUT.warn > $OUT.tmp TEMP=$(snmpget -v1 -c public $IP SNMPv2-SMI::mib-2.33.1.1.1.0) DEVICE=${TEMP##*:} # String TEMP=$(snmpget -v1 -c public $IP SNMPv2-SMI::mib-2.33.1.1.2.0) MODEL=${TEMP##*:} # String TEMP=$(snmpget -v1 -c public $IP SNMPv2-MIB::sysLocation.0) LOCATION=${TEMP##*:} # String TEMP=$(snmpget -v1 -c public $IP SNMPv2-SMI::mib-2.33.1.1.4.0) SERIAL=${TEMP##*:} # String TEMP=$(snmpget -v1 -c public $IP 1.3.6.1.4.1.705.1.4.8.0) LOWBATTERY=${TEMP##*:} # Integer % Point at which shutdown triggered TEMP=$(snmpget -v1 -c public $IP 1.3.6.1.4.1.705.1.5.1.0) TIME_REMAIN=${TEMP##*:} # Integer seconds TEMP=$(snmpget -v1 -c public $IP 1.3.6.1.4.1.705.1.5.2.0) BATTERY_LEVEL=${TEMP##*:} # Integer % TEMP=$(snmpget -v1 -c public $IP 1.3.6.1.4.1.705.1.5.9.0) BATTERY_FAULT=${TEMP##*:} # Integer 1=yes 2=no TEMP=$(snmpget -v1 -c public $IP 1.3.6.1.4.1.705.1.5.11.0) BATTERY_REPLACE=${TEMP##*:} # Integer 1=yes 2=no TEMP=$(snmpget -v1 -c public $IP 1.3.6.1.4.1.705.1.5.15.0) CHARGER_FAULT=${TEMP##*:} # Integer 1=yes 2=no TEMP=$(snmpget -v1 -c public $IP 1.3.6.1.4.1.705.1.7.3.0) OUT_ON_BAT=${TEMP##*:} # Integer 1=yes 2=no TEMP=$(snmpget -v1 -c public $IP 1.3.6.1.4.1.705.1.7.4.0) OUT_ON_BYPASS=${TEMP##*:} # Integer 1=yes 2=no TEMP=$(snmpget -v1 -c public $IP 1.3.6.1.4.1.705.1.7.10.0) OUT_OVERLOAD=${TEMP##*:} # Integer 1=yes 2=no TEMP=$(snmpget -v1 -c public $IP 1.3.6.1.4.1.705.1.7.10.0) COMMSOK=${TEMP##*:} # Integer 1=yes 2=no TEMP=$(snmpget -v1 -c public $IP 1.3.6.1.4.1.705.1.6.1.0) INPHASES=${TEMP##*:} # Integer 1 or 3
TEMP=$(snmpget -v1 -c public $IP 1.3.6.1.4.1.705.1.6.2.1.2)
INVOLT=${TEMP##*:} # Integer 10ths of a volt
TEMP=$(snmpget -v1 -c public $IP 1.3.6.1.4.1.705.1.6.2.1.3)
INFREQ=${TEMP##*:} # Integer 10ths of a Hertz
TEMP=$(snmpget -v1 -c public $IP 1.3.6.1.4.1.705.1.6.2.1.6)
INAMPS=${TEMP##*:} # Integer 10ths of an Amp
TEMP=$(snmpget -v1 -c public $IP 1.3.6.1.4.1.705.1.6.3.0)
INOK=${TEMP##*:} # Integer 1=yes 2=no
TEMP=$(snmpget -v1 -c public $IP 1.3.6.1.4.1.705.1.6.4.0)
INFAILCAUSE=${TEMP##*:} # Integer 1=no fault
# 2=bad voltage
# 3=bad frequency
# 4=no voltage
TEMP=$(snmpget -v1 -c public $IP 1.3.6.1.4.1.705.1.7.1.0)
OUTPHASES=${TEMP##*:} # Integer 1 or 3
TEMP=$(snmpget -v1 -c public $IP 1.3.6.1.4.1.705.1.7.2.1.2)
OUTVOLT=${TEMP##*:} # Integer 10ths of a volt
TEMP=$(snmpget -v1 -c public $IP 1.3.6.1.4.1.705.1.7.2.1.3)
OUTFREQ=${TEMP##*:} # Integer 10ths of a Hertz
TEMP=$(snmpget -v1 -c public $IP 1.3.6.1.4.1.705.1.7.2.1.4)
OUTLOAD=${TEMP##*:} # Integer %
TEMP=$(snmpget -v1 -c public $IP 1.3.6.1.4.1.705.1.7.2.1.5)
OUTAMPS=${TEMP##*:} # Integer 10ths of an Amp
TEMP=$(snmpget -v1 -c public $IP 1.3.6.1.4.1.705.1.7.11.0)
OVERTEMP=${TEMP##*:} # Integer 1=yes 2=no
echo "Manufacturer "$DEVICE | sed
's/"//g' >> $OUT.tmp echo "Model "$MODEL | sed 's/"//g' >> $OUT.tmp echo "Serial Number "$SERIAL | sed 's/"//g' >> $OUT.tmp echo "Location "$LOCATION | sed 's/"//g' >> $OUT.tmp echo >> $OUT.tmp #$LOWBATTERY WARN="" [ -z "$TIME_REMAIN" ] && TIME_REMAIN=0 [ $TIME_REMAIN -lt 1200 -a "$COLOUR" != "red" ] && COLOUR=yellow [ $TIME_REMAIN -lt 1200 ] && WARN="Time Remaining low" [ $TIME_REMAIN -lt 600 ] && COLOUR=red [ $TIME_REMAIN -lt 600 ] && WARN="Time Remaining critical" [ "$WARN" != "" ] && echo $WARN >> $OUT.warn ((s=$TIME_REMAIN%60)) ((m=$TIME_REMAIN/60)) echo "Time Remaining "$m Minutes $s Seconds >> $OUT.tmp WARN="" [ -z "$BATTERY_LEVEL" ] && BATTERY_LEVEL=0 [ $BATTERY_LEVEL -lt 70 -a "$COLOUR" != "red" ] && COLOUR=yellow [ $BATTERY_LEVEL -lt 70 ] && WARN="Battery level low" [ $BATTERY_LEVEL -lt 50 ] && COLOUR=red [ $BATTERY_LEVEL -lt 50 ] && WARN="Battery level critical" [ "$WARN" != "" ] && echo $WARN >> $OUT.warn echo "Battery Level "$BATTERY_LEVEL %
$OUT.tmp BATTERY_LEVEL=$(echo $BATTERY_LEVEL | sed 's/[ \t]*//') if [ $BATTERY_FAULT -eq 1 ] then BF=Yes COLOUR=red echo "Battery Fault!" >> $OUT.warn else BF=No fi echo "Battery Fault "$BF >> $OUT.tmp if [ $BATTERY_REPLACE -eq 1 ] then BR=Yes COLOUR=red echo "Battery replacement required" >> $OUT.warn else BR=No fi echo "Replace Battery "$BR >> $OUT.tmp if [ $BATTERY_FAULT -eq 1 ] then BR=Yes COLOUR=red echo "Battery replacement required" >> $OUT.warn else BR=No fi if [ $CHARGER_FAULT -eq 1 ] then CF=Yes COLOUR=red echo "Charger Fault" >> $OUT.warn else CF=No fi echo "Charger Fault "$CF >> $OUT.tmp if [ $OUT_ON_BAT -eq 1 ] then OUT_ON_BAT=Yes COLOUR=red echo "UPS running on battery" >> $OUT.warn else OUT_ON_BAT=No fi echo "On Battery "$OUT_ON_BAT >> $OUT.tmp if [ $OUT_ON_BYPASS -eq 1 ] then OUT_ON_BYPASS=Yes COLOUR=red echo "UPS on power bypass" >> $OUT.warn else OUT_ON_BYPASS=No fi echo "On Bypass "$OUT_ON_BYPASS $OUT.tmp if [ $OUT_OVERLOAD -eq 1 ] then OUT_OVERLOAD=Yes COLOUR=red echo "UPS output overload" >> $OUT.warn else OUT_OVERLOAD=No fi echo "Battery Overload "$OUT_OVERLOAD $OUT.tmp if [ $OVERTEMP -eq 1 ] then OVERTEMP=Yes COLOUR=red echo "Unit overheating" >> $OUT.warn else OVERTEMP=No fi echo "Unit Overheating "$OVERTEMP >> $OUT.tmp #if [ $COMMSOK -eq 2 ] #then # COMMSOK=No # COLOUR=red # echo "No comms from device" >> $OUT.warn #else # COMMSOK=Yes #fi #echo "Comms OK "$COMMSOK >> $OUT.tmp echo >> $OUT.tmp echo "Input Phases "$INPHASES >> $OUT.tmp INVOLT=$(echo "scale=1 ; $INVOLT/10" | bc) echo "Input Voltage "$INVOLT >> $OUT.tmp INFREQ=$(echo "scale=1 ; $INFREQ/10" | bc) echo "Input Frequency "$INFREQ >> $OUT.tmp INAMPS=$(echo "scale=1 ; $INAMPS/10" | bc) echo "Input Current "$INAMPS >> $OUT.tmp if [ $INOK -eq 1 ] then # A silly case of reverse logic applies here INOK=No COLOUR=red echo "Power input outside tollerance" >> $OUT.warn else INOK=Yes fi echo "Input OK "$INOK >> $OUT.tmp [ $INFAILCAUSE -eq 1 ] && FAILCAUSE="No failures" [ $INFAILCAUSE -eq 2 ] && FAILCAUSE="Voltage out of tollearance" [ $INFAILCAUSE -eq 3 ] && FAILCAUSE="Frequency out of tollernace" [ $INFAILCAUSE -eq 4 ] && FAILCAUSE="No voltage - power fail" echo "Cause of Failure "$FAILCAUSE >> $OUT.tmp echo >> $OUT.tmp echo "Output Phases "$OUTPHASES >> $OUT.tmp OUTVOLT=$(echo "scale=1 ; $OUTVOLT/10" | bc) echo "Output Voltage "$OUTVOLT >> $OUT.tmp OUTFREQ=$(echo "scale=1 ; $OUTFREQ/10" | bc) echo "Output Frequency "$OUTFREQ >> $OUT.tmp OUTAMPS=$(echo "scale=1 ; $OUTAMPS/10" | bc) echo "Output Current "$OUTAMPS >> $OUT.tmp OUTLOAD=$(echo $OUTLOAD | sed 's/[ \t]*//') echo "Output Load "$OUTLOAD % >> $OUT.tmp echo >> $OUT.final cat $OUT.warn >> $OUT.final cat $OUT.tmp >> $OUT.final echo '<FONT COLOR="Black">' >> $OUT.final echo "Load=$OUTLOAD" >> $OUT.final echo "Charge=$BATTERY_LEVEL" >> $OUT.final echo '</FONT>' >> $OUT.final rm $OUT.tmp rm $OUT.warn esac else echo "Device Unreachable!" >> $OUT.final COLOUR=red fi $BB $BBDISP "status $UPSNAME.ups $COLOUR $DATE $(cat $OUT.final)" rm $OUT.final done
From: Josh Luthman [mailto:josh at imaginenetworksllc.com] Sent: Thursday, 18 September 2008 7:27 AM To: hobbit at hswn.dk Subject: Re: [hobbit] UPS units
Thanks in advance for your input. Much appreciated. I look forward to reading your scripts!
I will not be wanting to shut my servers down, but instead switch them over to generators rather then the AC power. The generators we have at each site are not good/smart enough to take in AC power and kick on when it drops, unfortunately.
Josh Luthman Office: 937-552-2340 Direct: 937-552-2343 1100 Wayne St Suite 1337 Troy, OH 45373
Those who don't understand UNIX are condemned to reinvent it, poorly. --- Henry Spencer
On Wed, Sep 17, 2008 at 12:13 PM, Bill Arlofski <waa-hobbitml at revpol.com> wrote:
Josh Luthman wrote:
> I haven't looked into the mailing list very closely in the
past. From what > I know, we're still using "Hobbit", right? > > I'm looking at getting a full suit of new UPS units and I would like to see > what everyone is using out there. I would really like to find something > that works well with Hobbit so I can monitor them as easy as possible. I > will need to have Hobbit go red when power is down (batteries discharging) > is really my main concern here. More details would be prettier, though =) > > Thanks in advance!
Hi Josh...
I have been using NUT (Network Ups Tools -
http://eu1.networkupstools.org/ ) to monitor some APC UPSes. NUT is an excellent client/server UPS monitoring tool that allows you to automate the shutdown of multiple servers using AC power from one UPS when the battery is getting low. It can monitor many types of UPSes, and its client-server construction makes it well-suited to be monitored by other tools like hobbit, for instance.
I have created several hobbit client scripts to pull information
from the NUT server. These scripts are monitoring and graphing the following stats from (currently) two UPSes at one of my client's sites:
bat-charge %
ups-load %
in-voltage
out-voltage
bat-voltage
I have been planning (for quite some time now) to get these
things cleaned up and get them on the shire so everyone can make use of them. I have been far too busy though... I have a few projects coming to a close and may have time in the coming weeks to get these up there.
Let me take a quick look at my scripts in their current state.
Perhaps if they look reasonable enough, and some people are interested, I may just post them here with minimal instructions before I get a completed package ready for the shire.
The only pre-requisite to deploying my scripts is that NUT is
currently installed, running properly and monitoring at least one of your UPSes.
Let me know if this is of interest. I am looking to give back
to the hobbit community and this might be a perfect chance. :)
--
Bill Arlofski
Reverse Polarity, LLC
860-965-5110 Cell
http://www.revpol.com/
* Stop the NSA from illegally eavesdropping on your personal
email * Learn about PGP and start encrypting your email today http://gnupg.org or http://www.pgp.com
To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe at hswn.dk
NOTICE: This email and any attachments are confidential. They may contain legally privileged information or copyright material. You must not read, copy, use or disclose them without authorisation. If you are not an intended recipient, please contact us at once by return email and then delete both messages and all attachments.
Josh Luthman wrote:
Thanks in advance for your input. Much appreciated. I look forward to reading your scripts!
I will not be wanting to shut my servers down, but instead switch them over to generators rather then the AC power. The generators we have at each site are not good/smart enough to take in AC power and kick on when it drops, unfortunately.
Hi Josh... Just to clarify, the NUT program has the OPTION to shut servers down... It is not mandatory.
You can have it do anything you like (eg: run an arbitrary script, send email notifications) at certain events: battery percentage or certain runtime left, system on battery, AC back on etc.
Hope that clears things up.
NUT is a great package, and the scripts and graphs I have added to hobbit just monitor the UPSes managed by the NUT server. Then I use hobbit for the notifications when any of the data points reaches a defined threshold.
-- Bill Arlofski Reverse Polarity, LLC http://www.revpol.com/
- Stop the NSA from illegally eavesdropping on your personal email * Learn about PGP and start encrypting your email today http://gnupg.org or http://www.pgp.com
participants (9)
-
bgmilne@staff.telkomsa.net
-
Dan.McDonald@austinenergy.com
-
dshiels@paypal.com
-
Jason.Chambers@geosoft.com
-
josh@imaginenetworksllc.com
-
maik@vegasystems.com
-
NMaharaj@tcta.co.za
-
Vernon.Everett@woodside.com.au
-
waa-hobbitml@revpol.com