Service Template Inheritance

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
lb2cons
Posts: 72
Joined: Mon Dec 08, 2014 4:11 pm

Service Template Inheritance

Post by lb2cons »

Hello everyone.

I'm using NRDS to monitoring remote hosts, but, I'm facing a particular operational problem.

My problem is that I have to configure check_freshness, set a threshold, set max checks and others, but I have thousands of hosts and services. So, when you have an equal pattern you configure a template and atribute the template to the hosts and services right?

But NRDS wizard override all the settings and I can't use the pattern configured inside my template. The result is that every time a new service/host is configure I have to manually alter check_freshness and the others settings.

How can I overcome this issue? Please don't tell me to configure this inside every single service :oops:

Thanks in advance.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Service Template Inheritance

Post by lmiltchev »

I can't think of any clean workaround at the moment. Some of the config options can be changed in bulk via the "Bulk Modifications Tool", i.e. check_freshness, max_check_attempts, etc. if you had Enterprise Edition, but not all of them. We already have a feature request about adding this functionality (replacing/adding templates in bulk) but it will take some time before it is implemented.
Be sure to check out our Knowledgebase for helpful articles and solutions!
lb2cons
Posts: 72
Joined: Mon Dec 08, 2014 4:11 pm

Re: Service Template Inheritance

Post by lb2cons »

Yes i'm using the bulk modification, but, it's still a very slow and not straightforward method because I have millions of services to select/deselect inside the bulk load combo box, and every time a new host/service is added I will have to do the same process again :cry:

Second, to me templates it's now useless because the wizard set every option important to me and the service option takes precedence over the template :evil:

How can I solve this? How can I still take advantage of templates?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Service Template Inheritance

Post by lmiltchev »

You can try the following "workaround". Open the "/usr/local/nagiosxi/html/includes/configwizards/passiveobject/passiveobject.inc.php" file in a text editor, and modify the following two lines (approximately lines 270 & 286):

Code: Select all

"use" => "xiwizard_passive_host",
'use' => 'xiwizard_passive_service',
by replacing the "default" templates with the ones that you would like to use. The first one is for the host, the second one is for the services. Restart apache:

Code: Select all

service httpd restart
Note: This will have an impact on ALL passive checks that come to Unconfigured objects (not only NRDS checks)!

You can change the templates before running the passiveobject wizard, and change them back when you are done.
Be sure to check out our Knowledgebase for helpful articles and solutions!
lb2cons
Posts: 72
Joined: Mon Dec 08, 2014 4:11 pm

Re: Service Template Inheritance

Post by lb2cons »

Ok, this is what want. In future upgrades i'll need to change this file again? What I mean is, Nagios XI update will overwrite this customs modifications?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Service Template Inheritance

Post by lmiltchev »

What I mean is, Nagios XI update will overwrite this customs modifications?
This is correct.

Is it safe to lock this topic now? Thanks!
Be sure to check out our Knowledgebase for helpful articles and solutions!
lb2cons
Posts: 72
Joined: Mon Dec 08, 2014 4:11 pm

Re: Service Template Inheritance

Post by lb2cons »

Ok. Yes, it's safe, thank you!
Locked