However... now that I'm reading about it... should it be disabled if I intend to use templates to control service states?
This is a difficult question... On one hand, you would like nagios to retain state. On the other hand, it's a bit confusing when you modify a directive in a config, e.g. a template, but changes don't take effect immediately. You can change the following line in the nagios.cfg from this:
to this:
and restart nagios:
Keep in mind that this way, if someone on your team makes a change in the GUI, and configuration is applied, the changes will take effect immediately. This will include program-wide state variables, such as enable_notifications, enable_flap_detection, enable_event_handlers, execute_service_checks, and accept_passive_service_checks options. You can give it a try to see if this is what you would like to use.
My assumption was that making a change to the templates or services would take effect when applying the configuration - is that inaccurate? This seems like a newbie misunderstanding - if so please point me to what I should be reading/viewing to get a better handle on this.
Applying configuration will not change the "current state" of the program-wide state variables mentioned above, when using the default option:
See this:
https://assets.nagios.com/downloads/nag ... gram_state
Also, modifying a template would not make a difference if the directive is defined locally (on a service level), as local variables always take precedence over variables inherited from a template.
For example, you may have 50 services that use the same template. You have:
in the template, and you would like to disable notifications in bulk for all 50 services by modifying the template. You change the option to:
and apply configuration. You know that you have:
so this should work, right? Well, it will work for services that have "Skip" option selected in the CCM (that would inherit the variable from the template). If any of the services have:
defined locally (on the service level), changing the template won't do a thing.
See this:
https://assets.nagios.com/downloads/nag ... tance.html
Do I need to disable retention-state for this to work?
Again, it is your decision to make. I would recommend that you try this in a test environment first before applying it to production. Each Nagios XI license is approved for up to three installations: one primary monitoring/production, one backup/failover, and one test environment.
https://support.nagios.com/kb/article/n ... s-145.html
Hope this helps.