Page 1 of 1

uptime thresholds

Posted: Tue Dec 09, 2014 12:05 pm
by MichielvM
Hello all,

I was looking for a way to get alerts if a Windows host goes down 'in between checks'

There loads of SNMP related stuff out there, but my eye fell on a what's new text.
1.4.16 27th June 2012
ENHANCEMENTS
check_nt UPTIME accepts warning/critical thresholds (Ryan Kelly)
I could work with this, sadly there's 0 information to be found about this.
What syntax or arguments to parse etc.
Do I need $ARG3$ and $ARG4$? If so, what do I enter in there?

Re: uptime thresholds

Posted: Tue Dec 09, 2014 5:42 pm
by tgriep
MichielvM

I found a link that explains how the thresholds work for check commands and here is the link to it so you can review it.
https://nagios-plugins.org/doc/guidelin ... HOLDFORMAT

If you could give me more details on how your checks are setup currently, I might be able to help you better.

One example I have is if you want to create an alert if the up time is less than 5 minutes, you would use the following

-w 5:
this will create a warning if the up time is less than 5 minutes

If you want a critical error if the up time is less than 5 minutes, you would use
-c 5:

If you have any more questions, please post back.

Thanks.

Re: uptime thresholds

Posted: Thu Dec 11, 2014 4:27 am
by MichielvM
What is was really after was getting an alert if a server has rebooted.
I.e. in the Windows eventlog a Coldstart event is generated.

I figured when an uptime check results in less than x time, the host has been down.
I'll give your link and comments a go. will check back.

Re: uptime thresholds

Posted: Thu Dec 11, 2014 9:43 am
by tgriep
I found a couple of plugins that can check for if a Windows host has been rebooted.
Try one of these out and let us know if they will work for you.

http://exchange.nagios.org/directory/Pl ... MI/details
and
http://exchange.nagios.org/directory/Pl ... ot/details

Re: uptime thresholds

Posted: Thu Feb 26, 2015 12:33 pm
by MichielvM
tgriep wrote:MichielvM

I found a link that explains how the thresholds work for check commands and here is the link to it so you can review it.
https://nagios-plugins.org/doc/guidelin ... HOLDFORMAT

If you could give me more details on how your checks are setup currently, I might be able to help you better.

One example I have is if you want to create an alert if the up time is less than 5 minutes, you would use the following

-w 5:
this will create a warning if the up time is less than 5 minutes

If you want a critical error if the up time is less than 5 minutes, you would use
-c 5:

If you have any more questions, please post back.

Thanks.
Sorry for this late reply. I got it working using above tresholds.

Re: uptime thresholds

Posted: Thu Feb 26, 2015 12:39 pm
by cmerchant
Great. We'll go ahead and close the thread. Thanks.