Skip to content

Commit

Permalink
check_nt: make UPTIME accept warning/critical levels
Browse files Browse the repository at this point in the history
Patch originally by Ryan Kelly
  • Loading branch information
dermoth committed Oct 15, 2010
1 parent 654086f commit 6989366
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions THANKS.in
Original file line number Diff line number Diff line change
Expand Up @@ -265,3 +265,4 @@ Dann Frazier
Stephane Chazelas
Craig Leres
Brian Landers
Ryan Kelly
7 changes: 6 additions & 1 deletion plugins/check_nt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 6989366

Please sign in to comment.