Page 1 of 1

Notification Question

Posted: Fri Nov 17, 2017 9:15 am
by KS_CL_SysAdmin
All,
I am very new to the world of Nagios; and our global IT team has deployed a local server to us and wished us well in our local management of it. I have managed to have the system send an email alert when a service check comes back as "Critical". I think it does this by default... my question for those reading this is - is there a way to send an alert when a service goes from Critical back to Warning or OK? I know Solarwinds in a past employer would send an alert when things were down; as well as when they are back up. Can Nagios do the same with some type of configuration change?

Thank you for any assistance.-JH

Re: Notification Question

Posted: Fri Nov 17, 2017 10:30 am
by mcapra
The answer to this question lies buried within the documentation around "notifications" and "state types":
https://assets.nagios.com/downloads/nag ... tions.html
https://assets.nagios.com/downloads/nag ... types.html

The basic answer to your question is: Yes, Nagios Core recognizes a "recovery" as a state change and can dispatch notifications accordingly.

Nagios Core configuration objects (namely hosts, services, and contacts) offer a notification_options directive for determining which object is concerned with which types of notifications. In order to include notifications for "recovery" states, you'll need to include r in your notification_options.

More on that here (crtl+f for "notification_options"):
https://assets.nagios.com/downloads/nag ... tions.html

Re: Notification Question

Posted: Fri Nov 17, 2017 12:45 pm
by KS_CL_SysAdmin
Thank you for the pointer. I added the host_notification_options d,r to my contacts.cfg file and the desired results occurred. Thanks again!

Re: Notification Question

Posted: Fri Nov 17, 2017 1:21 pm
by kyang
Thanks @mcapra!!

@KS_CL_SysAdmin Sounds like your question is answered? Are we okay to close this thread? Or did you have any more questions?

Re: Notification Question

Posted: Fri Nov 17, 2017 1:24 pm
by KS_CL_SysAdmin
You may close this thread. Thank you - JH

Re: Notification Question

Posted: Fri Nov 17, 2017 1:26 pm
by kyang
Sounds good! I'll be closing this thread!

If you have any more questions, feel free to create another thread.

Thanks for using the Nagios Support Forum!