-
In Icinga director you create a service template with the checkcommand passive
-
Create a service on “YOUR-DC1” using that service template and give it a name (passive-testservice1)
-
Create an icinga API user to submit passive checkresults
-
write a script that collect the data on the dc and send your passive check result according to: https://icinga.com/docs/icinga-2/latest/doc/12-icinga2-api/#process-check-result
I would secure that via vpn and use the vpn ip address to submit the result
curl -k -s -S -i -u icingaapiuser:icingaapiuserpw -H 'Accept: application/json' \
-X POST 'https://icinga-on-aws:5665/v1/actions/process-check-result' \
-d '{ "type": "Service", "filter": "host.name==\"YOUR-DC1\" && service.name==\"passive-testservice1\"", "exit_status": 2, "plugin_output": "You are all gonna die done here...", "performance_data": [ "rta=5000.000000ms;3000.000000;5000.000000;0.000000", "pl=100%;80;100;0" ], "check_source": "yourdc1", "pretty": true }'
Send your result in an interval (5m) smaller than the check interval of the service template eg 10m otherwise your check flips to unknown because of the passive check command
If you send “exit_status”: 0 The check flips to OK
Example:
Service template: retryinterval 1m, check interval 10m, max attempts 3
Your result managed my some task scheduler interval: 5m