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.
Inherit notifcation settings from host object?
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Inherit notifcation settings from host object?
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
Let me know if that might work for you. It's also possible to enable/disable system notifications using the API.
Benjamin
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
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Inherit notifcation settings from host object?
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?
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?
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Inherit notifcation settings from host object?
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
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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Inherit notifcation settings from host object?
Perfect, that is what I needed to know. I appreciate the response. Thank you.
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Inherit notifcation settings from host object?
Hi @dfaenza,
Great. Let us know if you have any other questions or if it's ok to close this thread.
Thanks,
Benjamin
Great. Let us know if you have any other questions or if it's ok to close this thread.
Thanks,
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Inherit notifcation settings from host object?
You may close this thread. Thanks again!
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Inherit notifcation settings from host object?
Great!dfaenza wrote:You may close this thread. Thanks again!
Closing thread