I am working on a script to automate some of my internal needs. I’m calling the CheckMK API to get some info out of it.
I got this query from someone here, to filter services that are in crit or warn states:
It’s doing as intended, showing me all warn-state services in this case.
Though this includes all services in scheduled downtime it seems. Would it be possible to extend this query to ignore all services in scheduled downtime?
Also, would it be possible to get all crit and warn state services in a single filter query? Right now I’m calling the API twice, once with “right”:“1” and once with “right”:“2”.
If I could narrow that down to one API call that would be great
You can use operators like “and” and “or” to combine multiple expressions. The services table also has a column that shows if the service is in scheduled downtime.