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.
Soft vs hard
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Soft vs hard
Let's start here:
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.
This would require going straight from hard state to hard state.phyo wrote:After checking first and second time, they want to see as warning.
Code: Select all
max_check_attempts 1If 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
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.
Correct me if I understanding is wrong.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Soft vs hard
Your understanding of this is mostly correct.
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".
phyo wrote:one service has 5 mins check interval, retry interval is 1 min and maximum check attempt is 3
This is attempt 1/3phyo 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.
No, there are 2 more checks because when it first entered a SOFT critical state, this was attempt 1/3.phyo wrote: Email notification will wait after checking another 3 times in every minute.
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".
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Soft vs hard
Ok. I got it. Now can close this thread.
Thanks.
Thanks.