Page 1 of 1
Service Template Inheritance
Posted: Mon Jan 05, 2015 2:39 pm
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
Thanks in advance.
Re: Service Template Inheritance
Posted: Mon Jan 05, 2015 5:17 pm
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.
Re: Service Template Inheritance
Posted: Tue Jan 06, 2015 6:19 am
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
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
How can I solve this? How can I still take advantage of templates?
Re: Service Template Inheritance
Posted: Tue Jan 06, 2015 12:16 pm
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:
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.
Re: Service Template Inheritance
Posted: Tue Jan 06, 2015 2:35 pm
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?
Re: Service Template Inheritance
Posted: Tue Jan 06, 2015 3:56 pm
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!
Re: Service Template Inheritance
Posted: Wed Jan 07, 2015 12:25 pm
by lb2cons
Ok. Yes, it's safe, thank you!