Icinga / icingaweb2-module-director

The Director aims to be your new favourite Icinga config deployment tool. Director is designed for those who want to automate their configuration deployment and those who want to grant their “point & click” users easy access to the configuration.
https://icinga.com/docs/director/latest
GNU General Public License v2.0
413 stars 203 forks source link

Feature request: Allow change of service check execution variables in single service & apply rules #1998

Open Mikesch-mp opened 5 years ago

Mikesch-mp commented 5 years ago

Expected Behavior

For single services and apply rules in Director we have to create service templates that conatins everything we need in this service. But if you have to create a lot of different services that only differs in like retry_interval or enable_perfdata and so on, you have to create a lot of templates, which is not a solution for big installations.

For service Sets if you add a service to the set you can still change the settings , see the screenshot.

image

Current Behavior

you have to create a lot of templates

Possible Solution

Allow also in single services and apply rules to change the service settings like in service sets services.

Your Environment

slalomsk8er commented 3 years ago

I have the same problem and found a "solution".

I made service templates with descriptive names for the intervals, attempts, ... This way I can create single services and stack the import like this:

image

this renders to:

object Service "REDACTED" {
    host_name = "REDACTED"
    import "116-tpl-service-oracle-health-hep_bg"
    import "116 Check interval 15m"
    import "116 Retry interval 15m"
    import "116 Max check attempts 3"

    notes_url = "REDACTED"
    vars.oracle_health_name = "REDACTED"
    vars.oracle_health_name2 = "REDACTED"
}

which resolves to:

object Service "REDACTED" {
    host_name = "REDACTED"
    check_command = "116-cmd-check-oracle-health"
    max_check_attempts = "3"
    check_interval = 15m
    retry_interval = 15m
    enable_notifications = false
    enable_active_checks = true
    enable_passive_checks = false
    enable_event_handler = false
    enable_flapping = false
    enable_perfdata = false
    REDACTED
}

This is good enough for my needs and will help me keep the number of service templates at a manageable level.

ze42 commented 1 month ago

Bump the issue.

Would still be nice to have it configurable.

Would avoid wasting time trying to work around it with custom variable... that would not work for that.

Any reason not to implement it, and allow to override also once instantiated?

Goes for services, and for hosts, ... able to change exec options for a specific one, without having to create explicit matching templates would be nice!