Hi,
I've a problem with passive checks. I configured template for host. If
host is down and not send a notification, the icinga will run the
check_command=passive. This command set the status of host to 3
(unknown). But on my monitoring server will this command not running.

My question:
1. Config is not correct?
2. Bug in Icinga2?

I used in the past a icinga1 server and passive checks worked.

Or can me show somebody, where this is implemented. I can try to
implement it self?

Host Config

object Host "pctest" {
  import "passive-host"
  display_name = "PC Tes1"
  vars.group = "grouppassive"
}
object Service "CPU" {
  import "passive-service"
  host_name = "pctest"
  vars.group = "grouppassive"
}

Template

template Service "passive-service" {
        max_check_attempts = 1
        #retry_interval = 60
        check_interval = 2m

        enable_active_checks = false

        check_command = "passive"

        vars.dummy_state = 3
        vars.dummy_text = "No Passive Check Result Received."

        vars.notification["mail"] = {
        groups = [ "icingaadmins" ]
        }
}

template Host "passive-host" {
        max_check_attempts = 1
        #retry_interval = 60
        check_interval = 2m
        enable_active_checks = false
        enable_passive_checks = true

        check_command = "passive"

        vars.dummy_state = 3
        vars.dummy_text = "No Passive Check Result Received."

        vars.notification["mail"] = {
        groups = [ "icingaadmins" ]
        }
}

Passive Command (default /usr/share/icinga2/include/command-plugins.conf)

object CheckCommand "dummy" {
        import "plugin-check-command"

        command = [
                PluginDir + "/check_dummy",
                "$dummy_state$",
                "$dummy_text$"
        ]

        vars.dummy_state = 0
        vars.dummy_text = "Check was successful."
}

object CheckCommand "passive" {
        import "dummy"

        vars.dummy_state = 3
        vars.dummy_text = "No Passive Check Result Received."
}

equivalent configuration from icinga1 (template file)

check_freshness                 1       ; Default is to NOT check service 
'freshness'
   freshness_threshold             600     ; In Sekunden = 10Min.
   check_command                   check-passive!2! ; sendet Befehl, dass ein 
Service nicht erreichbar ist




_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to