Page 1 of 1
Soft vs hard
Posted: Thu May 28, 2015 2:52 am
by phyo
Hi,
We have one request from our customer.
What they want is as below.
Let say, one service has 5 mins check interval, retry interval is 1 min and maximum check attempt is 3. So after regular checking, the service status is critical. So nagios will try to check on another 1 min for 3 times. Right? After checking first and second time, they want to see as warning. And after checking 3rd time, they want to see as critical. Can it be possible?
For this case, nagios will check 4 times to send out the email notification if we enable email notification. But for the operation center, nagios will show warning/critical after checking fist time(5 mins interval regular check). Right?
Thanks.
Re: Soft vs hard
Posted: Thu May 28, 2015 10:29 am
by jdalrymple
Let's start here:
phyo wrote:After checking first and second time, they want to see as warning.
This would require going straight from hard state to hard state.
The logic to switch it to critical would have to come into play from a 2nd service or an escalation command that got involved and did an event handler sending a passive check or some other hacky thing. How bad does your client want this functionality? It is NOT something that is part of the Nagios core logic, and this *IS* core logic so it won't be changed.
If you chose to go further with this you could leverage the difference between your first and second service to handle notifications or escalations however you wished.
Re: Soft vs hard
Posted: Thu May 28, 2015 9:05 pm
by phyo
Basically what i am understanding is after checking the 5 mins check interval, if the status is critical we will see service critical or host down in the operation center. But it won't send email notification. Email notification will wait after checking another 3 times in every minute. 1st and 2nd time re-checking will show as soft. If during this checking, the service or host is normal, nagios won't send email notification. Am I right? After 1st and 2nd time re-checking still critical, it will check 3rd time and it will show as hard. After 3rd time checking, still happening the critical nagios will send email notification.
Correct me if I understanding is wrong.
Re: Soft vs hard
Posted: Thu May 28, 2015 9:15 pm
by Box293
Your understanding of this is mostly correct.
phyo wrote:one service has 5 mins check interval, retry interval is 1 min and maximum check attempt is 3
phyo wrote:Basically what i am understanding is after checking the 5 mins check interval, if the status is critical we will see service critical or host down in the operation center. But it won't send email notification.
This is attempt 1/3
phyo wrote: Email notification will wait after checking another 3 times in every minute.
No, there are 2 more checks because when it first entered a SOFT critical state, this was attempt 1/3.
For NO notification to be sent, either the next check (attempt 2/3) or the final check (attempt 3/3) will need to be OK.
A notification will be sent if the third check (attempt 3/3) is still critical.
Once attempt 3/3 is critical, the state is now a HARD CRITCAL, HARD states use the "5 mins check interval", SOFT states use the " retry interval".
Re: Soft vs hard
Posted: Tue Jun 02, 2015 10:53 pm
by phyo
Ok. I got it. Now can close this thread.
Thanks.