Hi, I’ve been asked to retrieve data from our on premise CheckMK installation using the REST API.
I’m primarily interested in information relating to whether a device is still running/available and any inventory data held about it. I’ve made a start and am hitting the following endpoint…
/domain-types/host_config/collections/all
…this brings me back a list of servers held (e.g. hostname) and various attributes. Ideally I want to see when a machine last ‘checked-in’, so I can tell whether it is online (for ‘proof-of-life’ purposes). Is the is_offline attribute used for this? Is there a date associated with when that machine was last shown to be ‘online’? Is there other REST API endpoints I should be hitting to get more information?
I’m also interested in retrieving as machine hardware/software info held on each. Reviewing the docs, I can see that hitting the host_inv_api.py should give me such (no REST API?), but when I do this for a server I only get the following…
{
"result": {
"Attributes": {},
"Nodes": {},
"Table": {}
},
"result_code": 0
}
I’m assuming that means the relevant inventory plug-in hasn’t been installed?
Thanks
Colin