Monitor config: wrong template order?!

Support requests, bug reports, questions etc.
Posts: 2
Joined: Wed Apr 25, 2012 14:54

Monitor config: wrong template order?!

Post by JPs » Wed Apr 25, 2012 20:35


I was just working on a Projekt with several Nagios instances.
As monitor Shinken is used for the collector a Nagios Core System. Don't ask! :D
I have got an pool of old Nagios Systems I need to work with a new Shinken System as Monitor.

At first every thing works fine, but after a while Shinken begins to check actively...
After checking the object files I realised that it is right!

Code: Select all

active_checks_enabled = 1
in it's config. But it shouldn't! It's just a monitor!

I had a closer look at the config files generated by nconf. It generates something like this:

Code: Select all

define service {
                service_description                   check_ping
                check_command                         service_is_stale
                host_name                             Test_Router
                check_period                          24x7
                notification_period                   24x7
                contact_groups                        +admins
                event_handler_enabled                 0
                use                                   local-service,Default_monitor_server
in the last line you can see that "local-service" overrides the attributes of "Default_monitor_server". Better to say: The Service doesn't inherit the attribute active_checks_enabled = 0 from Default_monitor_server, because it already inherited this attribute form local-service.

But shouldn't it be in the reverse order?
Default_monitor_server overrides the attributes in local-service? Especially active_checks_enabled.

In the generating program i found something like this:

Code: Select all

# process service-templates
                # templates will be applied to advanced-services in the following order: 

                # 1. template(s) directly linked to advanced-service
                # 2. default service template(s) linked to checkcommand
                # 3. notification_period template(s)
                # 4. check_period template(s)
                # 5. collector/monitor template(s)

                my @service_templates;
                push(@service_templates, @service_templates1);
                push(@service_templates, @service_templates2);
                push(@service_templates, @service_templates3);

I miss understand something! I tought the template should be used to override the Attributes to make it fine for the use with the monitor....

Here is the question: What concept stands behind the idea for the order of templates, overriding or appending the attributes?

At last:
nconf is a very nice project and in most situations it works fine to me! :-) Thanks for the nice work!