Build precise queries to find exactly what you need
Press ESC to close
Join our next live webinar: “Advanced Nagios Monitoring Techniques” – Register Now
@dozla
Favorites0
Views1
Projects1
Works like a charm
Reviewed 11 years ago
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 }
Works like a charm!
Very powerful plugin, no more messing around with NSClient++, just set it up and Monitor machines from XP to Server2012. Just one little thing for users from other countries, check for the installation language, nonetheless I would recommend using english language, in case your server is installed in e.g. german, review some sql querys, as some parameters on the server might be in german. Example: In check_wmi_plus/check_wmi_plus.d/check_sql.ini #query=SELECT * FROM Win32_PerfFormattedData_MSSQLSERVER_SQLServerWaitStatistics where Name = "Average wait time (ms)" query=SELECT * FROM Win32_PerfFormattedData_MSSQLSERVER_SQLServerWaitStatistics where Name = "Durchschnittliche Wartezeit (ms)"