Service apply runs ever enable_active_checks is disable

We use serveral service apply based in a template with enable_active_checks disable but we has a host that runs this services.

Sorry, but it’s hard to know how to respond your statement with anything other
than “oh dear”.

Please give us some information about your setup and configuration, for
example:

  • which version of Icinga are you running?

  • show us the template and the “service apply” statements

  • show us an example of one host where this works, and one host where it
    doesn’t

In summary - look at this from our point of view - give us enough information
so that we could replicate your situation in order to find out why it doesn’t
work as you expect. Otherwise we are simply guessing as to what your system
looks like, and we would probably guess incorrectly.

Antony.

Hello,
I am a partner of Emilio. I am going to provide you the requested information:

  • icinga version: v2.12.3-4-g09b0b4774

  • template “launch_linux” and service apply “check_connect_linux” are above

  • host where its works properly “vm-bar-hpeproxy21-p”, and where it doesn´t “vm-leg-hpeproxy11-p” (both are similar)

Thanks for your support. If you need something else, I will provide you

template Service “launch_linux” {
check_command = “launch_linux”
enable_active_checks = false
vars.remoteHost = “$address$”
vars.user = “$usuario$”
}

apply Service “check_connect_linux” for (config in host.vars.check_connect_linux) {
import “launch_linux”

assign where host.vars.check_connect_linux
vars.arguments = config
vars.command = "/var/lib/atos/plugins/linux/check_connect_linux"

import DirectorOverrideTemplate

}

template Host “generic” {
enable_active_checks = true
}

object Host “vm-bar-hpeproxy21-p” {
import “generic”

address = "10.33.177.23"
check_command = "hostalive"
vars.check_connect_linux = [
    "   --hostname 172.31.11.38  --port 8181",
    " --hostname 172.31.11.39  --port 8181",
    " --hostname 172.24.100.141 --port 7077"
]
vars.check_cpu_linux = " --warning 40 --critical 60"
vars.check_diractivity_linux = [
    " --dir /var/log/httpd --file access_7077_log --type NewestFile --warn 720 --crit 1440",
    "--dir /var/log/httpd --file access_7078_log --type NewestFile --warn 720 --crit 1440",
    "--dir /var/log/httpd --file access_deggr_4448_log --type NewestFile --warn 720 --crit 1440",
    "--dir /var/log/httpd --file access_acsgr_443_log --type NewestFile --warn 720 --crit 1440",
    "--dir /var/log/httpd --file access_degie_4449_log --type NewestFile --warn 720 --crit 1440"
]
vars.check_disk_linux = " --warning 70 --critical 90"
vars.check_http_linux = [
    " --port 8080 --hostname 172.31.11.38 --url \"/rcs/monitor\""
]
vars.check_logsearch_linux = [
    " --dir /home/jail/acacia --file Active_Alarms.txt --chain CRITICAL"
]
vars.check_mem_linux = " --warning 50 --critical 70"
vars.check_ping_linux = [
    " --hostname 10.33.177.23 ",
    "--hostname 212.73.42.162 ",
    "--hostname 10.33.21.28 "
]
vars.check_port_process_linux = [
    " --port 443 --proc httpd",
    "--port 4448 --proc httpd",
    "--port 4449 --proc httpd",
    "--port 7077 --proc httpd",
    "--port 7078 --proc httpd"
]
vars.tenant = "service_operations"
vars.usuario = "ACScmouser"

}

object Host “vm-leg-hpeproxy11-p” {
import “generic”

address = "10.18.127.69"
check_command = "hostalive"
vars.check_connect_linux = [
    "   --hostname 172.16.177.120  --port 8181",
    "  --hostname 172.16.177.121  --port 8181",
    " --hostname 172.24.100.141 --port 7077"
]
vars.check_cpu_linux = " --warning 40 --critical 60"
vars.check_diractivity_linux = [
    " --dir /var/log/httpd --file access_7077_log --type NewestFile --warn 720 --crit 1440",
    "--dir /var/log/httpd --file access_7078_log --type NewestFile --warn 720 --crit 1440",
    "--dir /var/log/httpd --file access_deggr_4448_log --type NewestFile --warn 720 --crit 1440",
    "--dir /var/log/httpd --file access_acsgr_443_log --type NewestFile --warn 720 --crit 1440",
    "--dir /var/log/httpd --file access_degie_4449_log --type NewestFile --warn 720 --crit 1440"
]
vars.check_disk_linux = " --warning 70 --critical 90"
vars.check_http_linux = [
    " --port 8080 --hostname 172.16.177.120 --url \"/rcs/monitor\""
]
vars.check_logsearch_linux = [
    " --dir /home/jail/acacia --file Active_Alarms.txt --chain CRITICAL"
]
vars.check_mem_linux = " --warning 70 --critical 85"
vars.check_ping_linux = [
    " --hostname 10.18.127.69 ",
    "--hostname 62.87.22.40",
    "--hostname 10.18.21.21 "
]
vars.check_port_process_linux = [
    " --port 443 --proc httpd",
    "--port 4448 --proc httpd",
    "--port 4449 --proc httpd",
    "--port 7077 --proc httpd",
    "--port 7078 --proc httpd"
]
vars.tenant = "service_operations"
vars.usuario = "ACScmouser"

}