Understanding notifications and object inheritance

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
pspagnola
Posts: 51
Joined: Thu Nov 21, 2019 4:40 pm

Understanding notifications and object inheritance

Post by pspagnola »

I am new to nagios, so excuse my ignorance.

I have read this:
https://assets.nagios.com/downloads/nag ... tance.html

My understanding:
- I can use templates to manage the settings for hosts/services allowing me to make small changes that apply to many objects.
- If multiple templates apply to an object and the templates don't have conflicting settings, then the object gets the sum of settings from all templates.
- If multiple templates apply to an object and the templates DO have conflicting settings, then the object resolves the conflict by using the first template (top one listed on the associated templates screen?) that defines the value; except when the value is defined directly on the object which always wins over any template.
- to convert an object from explicit (direct) settings to implicit (template), I have to remove all the settings from the object. perhaps using the bulk modification tool.

Correct me if I am wrong.

My questions:
- If an object or template has the notification option set to "skip" does it get all alert settings from the "upstream" template, or just the notification option ("on/off/skip/null")? Like the interval and the contacts / contact groups that are associated with the alert settings?
- If I have 10 hosts, 7 hosts need to send alerts to Team A, 3 hosts need to sent alerts to Team B, and all 10 hosts need to send alerts to Team C; then I could create a template for each of the three teams and applying the templates as needed to hosts.

Thanks in advance.
Nagios v5.6.12 ~200 hosts 500+ services.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Understanding notifications and object inheritance

Post by Box293 »

Your understanding is correct.

This documentation is going to help a lot at times.
https://assets.nagios.com/downloads/nag ... tions.html
pspagnola wrote:- If an object or template has the notification option set to "skip" does it get all alert settings from the "upstream" template, or just the notification option ("on/off/skip/null")? Like the interval and the contacts / contact groups that are associated with the alert settings?
Looking at a service, "notifications enabled" has a skip, "notification options" does not have a skip.

It's all about layering. When Nagios Core starts it creates a final object which is everything layered together. Skip means don't take this option when creating the config. If interval is not defined it will use whatever has been defined previously. Contacts / Contactgroups have separate options for combining settings.
pspagnola wrote:- If I have 10 hosts, 7 hosts need to send alerts to Team A, 3 hosts need to sent alerts to Team B, and all 10 hosts need to send alerts to Team C; then I could create a template for each of the three teams and applying the templates as needed to hosts.
Yes that is one way. Another way is done through escalations. https://assets.nagios.com/downloads/nag ... ations.pdf

This is a complicated topic so please feel free to ask very specific questions.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
pspagnola
Posts: 51
Joined: Thu Nov 21, 2019 4:40 pm

Re: Understanding notifications and object inheritance

Post by pspagnola »

Thanks for the escalation document. I will use that in the future. I want to make sure I understand basic notification logic before I do that.
Contacts / Contactgroups have separate options for combining settings.
Are you referring to escalations here or some other combination logic that is different from other object inheritance?
Nagios v5.6.12 ~200 hosts 500+ services.
pspagnola
Posts: 51
Joined: Thu Nov 21, 2019 4:40 pm

Re: Understanding notifications and object inheritance

Post by pspagnola »

I should have also asked in my last reply:

If host notifies Group A per direct settings and template of host notifies Group B, then does group A and B get the alert or only group A?
Nagios v5.6.12 ~200 hosts 500+ services.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Understanding notifications and object inheritance

Post by Box293 »

pspagnola wrote:Thanks for the escalation document. I will use that in the future. I want to make sure I understand basic notification logic before I do that.
Contacts / Contactgroups have separate options for combining settings.
Are you referring to escalations here or some other combination logic that is different from other object inheritance?
Contacts / Contactgroups have layering that is standard in all configs, escalations are an additional thing which allow more flexibility.
pspagnola wrote:I should have also asked in my last reply:

If host notifies Group A per direct settings and template of host notifies Group B, then does group A and B get the alert or only group A?
That depends on your choices such as +, Null or Standard. + is the only one that layers.

There is no if this/then/that logic with standard notifcations and templates, it's notify all the contacts regardless. The contacts themselves may be configured to not accept notifications of certain types etc. Escalations is the only way to notify different groups separately.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
pspagnola
Posts: 51
Joined: Thu Nov 21, 2019 4:40 pm

Re: Understanding notifications and object inheritance

Post by pspagnola »

Where do I select from + / Null / Standard in the Nagios XI GUI?
Nagios v5.6.12 ~200 hosts 500+ services.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Understanding notifications and object inheritance

Post by Box293 »

In the window where you select the contact or contact group, they appear down the bottom.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
pspagnola
Posts: 51
Joined: Thu Nov 21, 2019 4:40 pm

Re: Understanding notifications and object inheritance

Post by pspagnola »

thank you. I never noticed those options before.

Can you explain what each one does or provide a link for me to read?
Nagios v5.6.12 ~200 hosts 500+ services.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Understanding notifications and object inheritance

Post by scottwilkerson »

+ is additive inheritance
null removes inheritance

https://assets.nagios.com/downloads/nag ... tance.html
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
pspagnola
Posts: 51
Joined: Thu Nov 21, 2019 4:40 pm

Re: Understanding notifications and object inheritance

Post by pspagnola »

so....


+ means add these contacts and contact groups to the ones that may already be inherited from upstream templates.
null means use these contacts and contact groups, ignore upstream templates.
standard means ???

I am guessing standard means use either + or null based on what the default is as defined somewhere else?
Nagios v5.6.12 ~200 hosts 500+ services.
Locked