Host Template Cluster Zone vs Service Template Cluster Zone

This forum was archived to /woltlab and is now in read-only mode.
  • We have discovered the following behaviour: When the host template contains an cluster zone entry, it overides the cluster zone entry of a service template. E.g. the service is configured to be executed in the master zone but the host has the zone "satzone1". Then the service itself is executed in "satzone1" as well.

    We have no problem with this behaviour, in fact we are happy with it. We are concerned that this behaviour is just "as it is".

    Is this behaviour knowingly designed or will it possibly change in the future? (I didn't find any hints in the documentation).

    If it is planned I would suggest to amend the documentation.

  • Sounds strange indeed...

    Could you send your config files ? I'm curious to see what it looks like.

    'Cause I'm also workiing on a configuration template for my distributed env and this might be a problem for me


  • This is the resolved host template with zone "satzone1"

    1. template Host "TPL-HOST-IP4-Router-DE-Filiale" {
    2. import "TPL-HOST-IP4-MasterZone"
    3. check_interval = 3m
    4. zone = "satzone1"
    5. }

    Here you can see the resolved apply rule of an service template with zone "master"

    This is what you get, when you Inspect the deployed service:

  • Service apply rules automagically inherit the zone attribute set on the host, if specified. This is essentially necessary when used in combination with "zones.d" where you don't care about setting such attribute on the host objects themselves. The case that you're specifying the zone attribute for hosts is pretty much special and you should know what you're doing ;)

  • I've quite the same issue, so i'll not create a new thread. ;)

    So here is my Host file and the zone parameter equals to "master" (inherited from template_host).

    1. object Host "serveur2" {
    2.   import "template_host
    3. check_command = "hostalive"  
    4.   display_name = "serveur test"  
    5.   address = ""
    6. }

    I've a set of apply services defined in the folder global-templates/.

    Here is an example with the 'test-load" :

    1. apply Service "test-load" {  import "generic-service"  check_command = "load"
    2.   assign where host.vars.os == "Linux"}

    The problem is that I want those services to be executed by the local agent and not by the master.

    However, if I look in IcingaWeb2 I can see that the source is "master".

    As you explained dnsmichi, "Service apply rules automagically inherit the zone attribute set on the host, if specified."

    What can I do in my case to have services checked from local agent, but still have zone = master in the host because I want the hostalive check be made by the master ?

    Hope it's clear enough :).