Passive Check State OK instead of Pending

I have a service with passive check=true and active check=false. I submit per API for this service states OK,Critical and Warning. Now when i start this service no API calls came and status of service is in pending. This is not good. I want on start that service ist automatical on status OK and later there came per API another states. How i can configure this?

Hi, which check command are you using? When you’re using the passive check command, you can set the dummy_state to 0 by default in your service config.

I have set:

retry_interval = 30s
check_command = “passive”
command_endpoint = host.vars.client_endpoint
enable_active_checks = false
enable_passive_checks = true
check_interval = 25h
max_check_attempts = 1
enable_notifications = true
vars.dummy_state = 0

Dummy_state = 0 don’t work when i setup a new host with this service. State are after days in pending state…

You need to either enable active checks or manually send a passive check result. Otherwise, the service won’t be checked by Icinga 2 and thus there will be no check result for this service. When active checks is enabled, Icinga 2 will use your statically defined dummy_state.

use the “dummy” check command, it returns 0,
and enable active and passive checks