very handy – one minor problem

Very handy plugin – ran into one minor problem in version 2.4 with the “status” command. check_apcupsd only looks at the first word in the STATUS: provided by apcaccess. Changing the check at line 188 from this:
VALUE=`$APCACCESS status $HOSTNAME:$PORT | grep -i ^$ARG |
sed ‘s/.*: *([A-Z]*).*/1/’`
to this:
VALUE=`$APCACCESS status $HOSTNAME:$PORT | grep -i ^$ARG |
sed -e ‘s/^.*: *//’ -e ‘s/ *$//’`

seemed to do the trick for me – now our brand new UPS can report “ONLINE NOBATT” and we’ll notice!

Thanks!

John