Passive checks - Freshness check

I have configured passive check on a host, and I also want to be notified when those checks are not executed (via cronjob). But I want to do this without active checks. I want the state to go to Critical on the host when the passive check is not received. How can this be possible?

My current configuration is:

template Host “passive-host” {
max_check_attempts = 3
check_interval = 4m
retry_interval = 1m

enable_active_checks = false
enable_passive_checks = true
check_command = "dummy"

vars.dummy_state = 2
vars.dummy_text = "No Passive Check Result Received."
vars.alert_ocd = true
}

What do i need to edit in order to get an alert when that passive check is not received. Thanks in advance!

  • change command to “passive”
  • remove alle the dummy_ you dont need the for the passive command
  • enable active checks
    • this will trigger the passive command which returns unknown on execution.
  • add a proper notification rule
    you check interval is 4m you could send your passive result every minute or every two minutes.
    as long as your passive check result arrives, the check execution of the passive check is delayed it
1 Like

I want to do it without active checks as mentioned in the first post.

can you tell me why you want that?

Well, it is due to a security reasons in our environment. I need to do it without active checks.

The active “freshness” check utilizes the build in dummy command so I don’t see the security implication.

I think there is a misunderstanding:
the command check passive gets only actively executed on the master/satellite responsible for the host. it does not send anything to the host. the only prurpose of the active check is so the master/satellite can decide when there is a state change from the check result not beeing delivered

and the passive command is only a cleaner way that to write:

check_command = "dummy"

vars.dummy_state = 2
vars.dummy_text = "No Passive Check Result Received."
1 Like

What I want to accomplish is the following:

I have a script that is running on one host and it sends the result to Icinga2 using the REST API via cronjob every 5 minutes. If this script is stopped and not running I do not get an alert. It stays in green state in Icinga. I want to receive an alert when this script is not executed. I want the state to go to CRITICAL and receive an alert. Is that possible without active checks?

To quote Hamlet, act III, scene III, line 92— “no”.

1 Like