How to send "passive" check results from an external Script

ah ok, thanks @dnsmichi for the info. That’s a way I didn’t know/imagine.
We do the tests at the side from icinga2 not at the side of the script. Like Thomas and Lennart wrote in the icinga2 book at page 228. :wink:

@joltmann Our test case is to send a test snmptrap to the icinga master to check everything is working fine. Here we run logstash to recevie SNMP traps and pass the trap to icinga. This happens every hour.
This is the defination from our test snmptraps on our two masters (rendered from the director):

apply Service “snmptrap_test” {
import “template_generic-service_passive”
check_command = "passive
max_check_attempts = “1”
check_interval = 3800s
retry_interval = 70s
enable_active_checks = true
assign where host.name == “master1” || host.name == “master2”
vars.dummy_state = “1”
vars.dummy_text = “Kein SNMP-Trap empfangen”

 import DirectorOverrideTemplate 

}