Using a check result in Service/CheckCommand?

Hello,

Is it possible to use a check result of a service in another service or checkcommand or any other ojbect ?

Thanks

yes it is possible :slight_smile:

That’s cool. Can you please share an example ?

Thanks

use icinga dsl in your check command

https://icinga.com/docs/icinga-2/latest/doc/18-library-reference/#get_service

function get_service(host_name, service_name);

https://icinga.com/docs/icinga-2/latest/doc/09-object-types/

last_hard_state
last_check_result->output