icingaweb2-module-director icon indicating copy to clipboard operation
icingaweb2-module-director copied to clipboard

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

Open Mikesch-mp opened this issue 6 years ago • 2 comments

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

  • Director version (System - About): 1.7.1
  • Icinga Web 2 version and modules (System - About): 2.7.3
  • Icinga 2 version (icinga2 --version): 2.11.2
  • Operating System and version: Centos 7.7
  • Webserver, PHP versions: the required fpm version for icingaweb2.

Mikesch-mp avatar Oct 25 '19 09:10 Mikesch-mp

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.

slalomsk8er avatar Jan 06 '21 20:01 slalomsk8er

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!

ze42 avatar Oct 21 '24 11:10 ze42