diff options
-rw-r--r-- | THANKS.in | 1 | ||||
-rw-r--r-- | plugins/check_nt.c | 7 |
2 files changed, 7 insertions, 1 deletions
@@ -265,3 +265,4 @@ Dann Frazier Stephane Chazelas Craig Leres Brian Landers +Ryan Kelly diff --git a/plugins/check_nt.c b/plugins/check_nt.c index 32d4ff6c..60806bb3 100644 --- a/plugins/check_nt.c +++ b/plugins/check_nt.c @@ -203,7 +203,12 @@ int main(int argc, char **argv){ uphours = (uptime % 86400) / 3600; upminutes = ((uptime % 86400) % 3600) / 60; asprintf(&output_message,_("System Uptime - %u day(s) %u hour(s) %u minute(s)"),updays,uphours, upminutes); - return_code=STATE_OK; + if (check_critical_value==TRUE && uptime <= critical_value) + return_code=STATE_CRITICAL; + else if (check_warning_value==TRUE && uptime <= warning_value) + return_code=STATE_WARNING; + else + return_code=STATE_OK; break; case CHECK_USEDDISKSPACE: |