Can I use Host Runtime Macros with cURL?

Hi,

I’m searching how can i get host’s services state and i found this https://icinga.com/docs/icinga2/latest/doc/03-monitoring-basics/#host-runtime-macros. I don’t know if I can use these, if I can’t what command can i use with cURL to get the hosts with their services states who are critical, warning ?

Thanks

Hi,

a typical filter expression inside the request would look like:

"filter": "service.state!=0", "joins": [ "host.name" ]

You can filter by any config or runtime attribute listed for the respective object type.

Cheers,
Michael