Fetch Check Latency via CLI or custom script?

Hello community,

is it possible to fetch the check latency of icinga2, which can be retrieved via the monitoring health page (/monitoring/health/stats), via the cli or some sort of existing check?
image
I want to monitor the check latency from an external source.
Thanks in advance!

Best regards
Michel W.

Hi Michel,

you can get this via the API:
https://icinga.com/docs/icinga2/latest/doc/12-icinga2-api/#status-and-statistics