aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Thomas Guyot-Sionnest <dermoth@aei.ca> 2010-10-13 00:10:25 -0400
committerGravatar Thomas Guyot-Sionnest <dermoth@aei.ca> 2010-10-15 01:52:29 -0400
commit6989366b8d3ccd03b428610ca059f22be724f8be (patch)
treeebff640cdd0b66588f17713f3648fccb329143f9 /plugins
parent654086f1117ee22d9f7e8270330daff6c463c9ad (diff)
downloadmonitoring-plugins-6989366b8d3ccd03b428610ca059f22be724f8be.tar.gz
check_nt: make UPTIME accept warning/critical levels
Patch originally by Ryan Kelly
Diffstat (limited to 'plugins')
-rw-r--r--plugins/check_nt.c7
1 files changed, 6 insertions, 1 deletions
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: