Home Directory Plugins Hardware UPS APC check_apcupsd_v1_3 (performance data output added)

check_apcupsd_v1_3 (performance data output added)

Bookmark and Share

Rating
2 votes
Favoured:
0
Hits
85061
Files:
FileDescription
check_apcupsd_v1_3check_apcupsd_v1_3
check_apcupsd v1.2 is now v1.3 (performance data output added)
Using pnp4nagios there is the need to get performance data. So I added some output for the performance data to the script. It works fine but further improvement is welcome.
Reviews (1)
bythundercost, February 12, 2013
I have a better value rounding meth?d to suggest.
I changed the line:
ROUNDED=`echo $VALUE | sed 's/\..*//'`
with:
ROUNDED=`echo $VALUE | awk '{printf("%d\n",$1 + 0.5)}'`

I faced a problem when the '.7' value for Input voltage (power failure) appeared to be 'OK'.
Thank you!