mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-07-16 12:15:14 -04:00
check_nt: make UPTIME accept warning/critical levels
Patch originally by Ryan Kelly
This commit is contained in:
parent
654086f111
commit
6989366b8d
2 changed files with 7 additions and 1 deletions
|
|
@ -265,3 +265,4 @@ Dann Frazier
|
|||
Stephane Chazelas
|
||||
Craig Leres
|
||||
Brian Landers
|
||||
Ryan Kelly
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue