Hello,
I’m new here, maybe you can help me with my question.
I use the API quite a lot to query information about the hosts or services, also to create/remove downtime, acknowledgement, etc. Very powerfull tool and the documentation is also quite good to understand the filters.
I wonder if there is a way to get the history of a given host or service, either using curl or icingacli. I’m talking about the history you can see in Icingaweb2 when you click on the history tab for a given host/service.
I have not found anything about this so right now my only option would be to dig directly into the database which I would like to avoid if possible.
the REST API is a status and config API and allows to query the runtime state of the core. There’s no history backend for this kind of API.
The data you’re seeing with Icinga Web 2 is stored in a database, namely DB IDO. Relational databases have proven to work reliably with storing and retrieving historical event data. As such, if you want to retrieve that data, the Icinga Web 2 API (format=json) is a good candidate. Keep in mind that automated queries and long running SQL statements may harm operations, so using that with care and a caching daemon in the middle is a good advise.
hi, do you know where is the document about icingaweb2 api? i want to set acknowledge_notify through the icingaweb2 api, but i could not find the documentation in anywhere.