Build precise queries to find exactly what you need
Press ESC to close
Hey,
added a check for Runtime againt Warning / Critical Values. Noticed that one of our UPS had a remaining runtime of 6! Minutes, but the Replacement Flag for the battery was not set.
case “runtime” { my $ups_runtime_ticks = query_oid($oid_runtimeleft); my $ups_runtime_mins = int($ups_runtime_ticks / 100 / 60); my $perf_data = “|’Runtime Remaining’=$ups_runtime_mins,$warning_threshold,$critical_threshold;;”;
if ($ups_runtime_mins > $warning_threshold) { print “OK, (Runtime remaining: $ups_runtime_mins minutes)$perf_datan”; exit $OKAY; } elsif ($ups_runtime_mins > $critical_threshold) { print “Warning, (Runtime remaining: $ups_runtime_mins minutes)$perf_datan”; exit $WARNING; } else { print “Critical, (Runtime remaining: $ups_runtime_mins minutes)$perf_datan”; exit $CRITICAL; }
#print “MINUTES: $ups_runtime_minutesn”; #exit $OKAY; }
Host File:
define service{ use local-service ; Name of service template to use host_name service_description RUNTIME check_command check_apc!runtime -w 20 -c 10 }
We’ve completely redesigned the world’s largest repository of Nagios plugins and monitoring tools. Join thousands of users sharing monitoring solutions for servers, applications, and everything in between.
Due to our redesign, all existing accounts require a password reset to access your account again.
Ready to explore 6,100+ projects and contribute to the community?
Reset Password Create Account
Happy Monitoring!