check_period inheritance from host to service

This forum was archived to /woltlab and is now in read-only mode.
  • Hi,

    I want all my service checks to inherit identical check_period from the host object. The reason for this is we shut down the different hosts at about 100 different timeperiods. I would prefer to have only 6 service definitions for my 3000 hosts and have the check_period set on the host only.

    If I have to define the 6 timeperiods specifically for 100 different timeperiods, I will have 600 service definitions instead of 6. I'm lazy and think it would be a lot easier to have it set on host only.

    If I write the config in files, I can make it work with this setting, but its not working on the Director-defined objects. I would prefer to have it in Director, but I could live with having it a file too.

    1. template Service "generic-service" {
    2.   max_check_attempts = 5
    3.   check_interval = 1m
    4.   retry_interval = 30s
    5. if (host.check_period != "") {
    6.  check_period = host.check_period
    7. }
    8. }

    Thanks in advance.