Is there a way to disable recoveries from WARNING states (but keep the recovery messages from PROBLEM states?)
We only want to be notified when there is a PROBLEM with a service and when that service recovers. What happens is that each time the service enters a WARNING state and then recovers we get that RECOVERY notification.
Thanks for any thoughts.
Disable Nagios recovery notification only after WARNING?
Re: Disable Nagios recovery notification only after WARNING?
So you do not want to be notified when a warning state recovers, only critical recoveries?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Disable Nagios recovery notification only after WARNING?
Yes, that is correct. We only want notification for critical recoveries.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Disable Nagios recovery notification only after WARNING?
You cannot get that granular, what you can do is disable notifications from being sent for certain state changes. This includes warning, critical, and recovery, as there is no link between a warning recovery and a critical recovery you cannot disable one or the other. What you could do is disable alerting for warning which may "may" suppress the recovery alert from that state. Or, you could bump the warning threshold up to a level that really matters to you which you would want to be notified for as this sounds like a case where they are annoying you. Why not make them useful?
Re: Disable Nagios recovery notification only after WARNING?
Hi dunnlow,
In this case you should be able to create two contacts - one with just warning option, and the other with everything but warning - put them in a contact group and assigned that to the services in question (maybe create a template which mirrors generic-service, but changes the "contact_groups". Then you can assign this to the services).
Once it enters WARNING, it will mail testone. When it recovers from warning it won't mail anyone.
Once it enters any other state (e.g. CRITICAL), it will mail test two. When it recovers back to OK it will mail testtwo.
Good luck!
Kind Regards,
Gary Shergill
In this case you should be able to create two contacts - one with just warning option, and the other with everything but warning - put them in a contact group and assigned that to the services in question (maybe create a template which mirrors generic-service, but changes the "contact_groups". Then you can assign this to the services).
Code: Select all
define contact{
contact_name testone ; Short name of user
use generic-contact ; Inherit default values from generic-contact template (defined above)
alias Test 1 ; Full name of user
email [email protected]
service_notification_options w
}
define contact{
contact_name testtwo ; Short name of user
use generic-contact ; Inherit default values from generic-contact template (defined above)
alias Test 2
email [email protected]
service_notification_options u,c,r,f,s
}
define contactgroup{
contactgroup_name testing
alias Test Group
members testone, testtwo
}Once it enters any other state (e.g. CRITICAL), it will mail test two. When it recovers back to OK it will mail testtwo.
Good luck!
Kind Regards,
Gary Shergill
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Disable Nagios recovery notification only after WARNING?
Awesome idea Gary, that should work perfectly!!
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.