I am trying to figure out the benefits of using service templates and host templates or just add hosts using the wizard each time with Nagios XI. With Nagios Core I can see where having this setup is beneficial for management. I currently have 2112 hosts with 11856 service checks running Nagios XI 5.2.7. Some of the issues I am encountering is the proper management of adding hosts and service checks. Is there any difference with just adding hosts with the wizard or is leveraging the host and service templates the recommended method? I haven't found any easy was to exclude certain checks when setting up hosts and service checks with templates and since Nagios XI has a Bulk Modifications tool I am wondering if using the wizard isn't the way to go. Does this add higher load on a Nagios XI installation? Soon I will be looking at potentially upgrading the OS to RHEL 7.2 to run Nagios XI on, currently running on CentOS 6.7, so I can manage the OS patching better with our management tool. My position I wear multiple hats so the monitoring role doesn't get the proper attention so when I do something at times it can take me awhile to remember what and why I did certain things in Nagios XI. Backtracking service checks to the appropriate service templates and figuring out what what hostgroups and who the contacts/contact groups are can become time consuming. Unless there is a tool within Nagios XI that I am unaware of.
I guess my biggest issue with the templates are figuring out what services are tied to the service templates and not being able to exclude a service check for a particular host tied to the service template. Also, assigning a contact or contact group to the individual service complicates things as well for my environment. For those managing large environments do you have any suggestions or recommendations to make administration of Nagios Xi easier? How are you setting up your environments?
With Nagios XI you have a production instance, test instance and DR instance. Is it possible to use the production and DR instances for load balancing? I have all my hosts and services running on the production instance (all virtual machines) so the DR instance is just sitting there doing nothing but monitoring my production and test Nagios XI instance? Is there significant improvements by off loading the MySQL database? I am sure more questions will come as I am back focusing on our Nagios XI environment.
Managing and Templates
Re: Managing and Templates
#1 advantage - if you want to change something common to multiple machines, then you need to change multiple machines individually or via the Enterprise add-on if you are not using service/host templates. If you are using template, you just change the template and everything that is based on it changes instantly.
You may be confusing service check/host templates with service/host groups. Templates define parameters common to the host or service. Groups group hosts or services so that you can assign services to host groups and now all those groups use that service without creating multiple service definitions for each host via a wizard. This is _KEY_ to managing a large installation. There are no real limits to how many host groups or service templates you can define, so feel free to tag your hosts with as many host groups as you need (I find it easier to think of host groups as host tags) and then create as many services as you need that all use the same service template, (or multiple ones) but differ only in terms of which hostgroups they are assigned to.
No, you cannot use production and DR instances for load balancing, because the terms of your license say that only one server can be actively monitoring at one time. It's failover, not load balancing.
You may be confusing service check/host templates with service/host groups. Templates define parameters common to the host or service. Groups group hosts or services so that you can assign services to host groups and now all those groups use that service without creating multiple service definitions for each host via a wizard. This is _KEY_ to managing a large installation. There are no real limits to how many host groups or service templates you can define, so feel free to tag your hosts with as many host groups as you need (I find it easier to think of host groups as host tags) and then create as many services as you need that all use the same service template, (or multiple ones) but differ only in terms of which hostgroups they are assigned to.
No, you cannot use production and DR instances for load balancing, because the terms of your license say that only one server can be actively monitoring at one time. It's failover, not load balancing.
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Re: Managing and Templates
So since I have the Enterprise add-on the templates don't really buy me anything extra?
Is there a performance benefit with templates over just a config file for each host? Is there a way to load balance with Nagios XI? I'll have to look at the failover which I am assuming requires backups and restores to the DR site. Probably should test that before I actually need it. Hopefully, it will never happen but I haven't tested that out.
Is there a performance benefit with templates over just a config file for each host? Is there a way to load balance with Nagios XI? I'll have to look at the failover which I am assuming requires backups and restores to the DR site. Probably should test that before I actually need it. Hopefully, it will never happen but I haven't tested that out.
Re: Managing and Templates
Templates are more powerful than the bulk change option of the Enterprise add-on. There is a performance gain in that there is less disk I/O when reading fewer files, but it's probably marginal.
The best information on the subject (which applies to both Core and XI) is here: https://assets.nagios.com/downloads/nag ... tance.html
The best information on the subject (which applies to both Core and XI) is here: https://assets.nagios.com/downloads/nag ... tance.html
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Re: Managing and Templates
That was a nice read, thanks!
How do you manage the exceptions with templates? You want all the services except one or you want to add additional contacts or contactgroups to a particular service check?
How do you manage the exceptions with templates? You want all the services except one or you want to add additional contacts or contactgroups to a particular service check?
Re: Managing and Templates
In XI, anything you specify directly in the service (or host) configuration in CCM will override the template settings by default. Unfortunately, I don't think there's currently a way to say "apply this service template to this hostgroup, but NOT to this host that is also a member of the hostgroup." You may need to do static config files for the host and do a - operation on the specific service check for that....I'm fuzzy on the details. Maybe someone who actually works for Nagios can chime in. 
In the meantime, you can also include templates in templates (as you learned from that link) and create two hostgroups - one with the check(s) and one without and do things that way.
In the end, a well-planned hostgroup naming scheme and templating system will save you lots of of time over needing to make changes to lots of wizard-added services and hosts. But like all other things Nagios related, if it works for you....
In the meantime, you can also include templates in templates (as you learned from that link) and create two hostgroups - one with the check(s) and one without and do things that way.
In the end, a well-planned hostgroup naming scheme and templating system will save you lots of of time over needing to make changes to lots of wizard-added services and hosts. But like all other things Nagios related, if it works for you....
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Re: Managing and Templates
Almost made it to page 2 without someone from Nagios chiming in! @eloyd stop being so helpful!
But yes, at the moment exclusions via the CCM are not built yet, so static config files must be used if you want this functionality. Keep an eye on the next XI release though :)
But yes, at the moment exclusions via the CCM are not built yet, so static config files must be used if you want this functionality. Keep an eye on the next XI release though :)
Former Nagios employee
Re: Managing and Templates
Just wait till tomorrow..... 
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!