summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 654086f)
raw | patch | inline | side by side (parent: 654086f)
author | Thomas Guyot-Sionnest <dermoth@aei.ca> | |
Wed, 13 Oct 2010 04:10:25 +0000 (00:10 -0400) | ||
committer | Thomas Guyot-Sionnest <dermoth@aei.ca> | |
Fri, 15 Oct 2010 05:52:29 +0000 (01:52 -0400) |
Patch originally by Ryan Kelly
THANKS.in | patch | blob | history | |
plugins/check_nt.c | patch | blob | history |
diff --git a/THANKS.in b/THANKS.in
index 6666de4fc7ea2496ef988a3c13ca2a4397a2b37c..ac2b1c24119b31a8fe287abd70b48589affcdebd 100644 (file)
--- a/THANKS.in
+++ b/THANKS.in
Stephane Chazelas
Craig Leres
Brian Landers
+Ryan Kelly
diff --git a/plugins/check_nt.c b/plugins/check_nt.c
index 32d4ff6c99f87a2b8d70150e8062c5c34b87b789..60806bb399fb1f6df5be62faf7d0b4c3e2574a85 100644 (file)
--- a/plugins/check_nt.c
+++ b/plugins/check_nt.c
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: