Page 1 of 1

Inherit notifcation settings from host object?

Posted: Tue Sep 29, 2020 10:39 am
by dfaenza
I would like to ask if there is a way to inherit the notification settings from a host object for the service object. I see on the implied inheritance section of https://assets.nagios.com/downloads/nag ... tance.html that the notification period and notification interval is inherited if not defined. However is there a way to inherit whether or not notifications will be sent from the object?

In my case we have both production and preproduction servers that we are monitoring out of our Nagios XI instance. We want our production servers to send notifications. However, we do not want our preproduction servers to send notifications out. We do not want to have to define production and preproduction service objects in order to accomplish this if possible. I have not been able to identify a way to accomplish this through inheritance. Do you have any pointers on how I might be able to accomplish this?

We would like to see if there are issues on preproduction servers in the Nagios XI console, however do not need alerts going out via email and SMS to on-call individuals.

Re: Inherit notifcation settings from host object?

Posted: Wed Sep 30, 2020 11:08 am
by benjaminsmith
Hi @dfaenza,

Since hosts and service objects are fundamentally different object types it's not possible to set service to inherit from a host template.

However, after reading over your requirements, one option I would suggest is to disable notifications globally on the pre-production instance. This can be done by changing the following option in the main Nagios configuration file at /usr/local/nagios/etc/nagios.cfg

Code: Select all

enable_notifications=0
Let me know if that might work for you. It's also possible to enable/disable system notifications using the API.

Benjamin

Re: Inherit notifcation settings from host object?

Posted: Wed Sep 30, 2020 1:48 pm
by dfaenza
Thank you for your reply, @benjaminsmith.

In our case we are monitoring both production and preproduction out of the same instance of Nagios XI. I have been giving this some thought and wondered if I create a "PreProduction" host group and apply it to the hosts that are preproduction in our environment, would I be able to put them in indefinite or 24x7 downtime. I'll have to read up on it, but if I may ask another question, if I pursue this route of putting the hosts in down time and also select that the services be put in down time, is that going to affect all of the services globally or only those applying to the host object.

ie. Host1 gets put in down time and I also select that down time apply to related services. If I'm watching CPU and RAM utilization on Host1, does selecting that services also be put in down time only affect the services that are being watched on Host1, or would it put those services in down time on all of the hosts using that service check?

Re: Inherit notifcation settings from host object?

Posted: Thu Oct 01, 2020 3:39 pm
by benjaminsmith
Hi,

Besides the option of using downtime, there are many ways to control and adjust notifications in Nagiso XI, for example:

1. Contacts
2. User or contact notification options
3. Host and service level notification options
4. Contact time periods

However, to answer your question about the downtime for child services, it would only apply to the services of the host in downtime and not globally to other hosts using those same service checks.

Hope that helps answer your question.

--Benjamin

Re: Inherit notifcation settings from host object?

Posted: Fri Oct 02, 2020 10:59 am
by dfaenza
Perfect, that is what I needed to know. I appreciate the response. Thank you.

Re: Inherit notifcation settings from host object?

Posted: Mon Oct 05, 2020 12:37 pm
by benjaminsmith
Hi @dfaenza,

Great. Let us know if you have any other questions or if it's ok to close this thread.

Thanks,
Benjamin

Re: Inherit notifcation settings from host object?

Posted: Tue Oct 06, 2020 10:39 am
by dfaenza
You may close this thread. Thanks again!

Re: Inherit notifcation settings from host object?

Posted: Tue Oct 06, 2020 1:17 pm
by scottwilkerson
dfaenza wrote:You may close this thread. Thanks again!
Great!

Closing thread