I’m looking to extract data via the REST APIs from v2.0 and v2.1 CheckMK instances we host for a number of clients, so we can get data into our centralised reporting, rather than engineers having to logon to each system and pull graphs.
Are the new REST APIs operational in v2.0 / v2.1 (if only 2.1 then we - company - will need to plan upgrades across a number of clients to implement) for the extraction of CPU and Memory performance data? I’ve seen old responses on here that they aren’t active, so want to check the status before I continue trying to get it up and running.
A working example query in CURL would be great if the APIs are ready.
Happy to test them in curl but looking to ultimately run them from .NET applications.
please don’t do that, even if its possible to extract a lot of data using many different metods in checkmk you will create unessisary load on the system.
Use the InfuxDB exporter instead and export performance data in realtime, you can define exactly what services you want to export. You can have separate InfluxDB instances for every client if you want
Hi Anders. We’re only looking to pull a few metrics e.g. cpu daily avg/max, mem for a server, so would only be several metrics/day/server, pulled weekly for the previous week - so it should be a tiny amount of data to extract.
I’ll look at InfluxDB, had seen that as a possibility, but it’s another piece of software to deploy & maintain across many clients.
So you are willing to spend time and effort to write code that exports data and imports them into a database that you need to maintain but don’t consider using an database that someone else maintain as a good solution? That is interesting.
It’s not the number of metrics that puts load on a system, if checkmk gets 1 or 1000 metrics does not really matters, its the same live status query.
What makes it different is the numer of HOSTs that ju need to get data from and the numbers of servers (in distributes monitoring) that you need to talk to.
We monitor 1M+ services so I think I know what is “large” here…
Indeed. This is looking to export data from 50+ CheckMK instances into a central reporting server. This is an absolute fraction of what the core system does, so already heavily invested. As deploy & maintain 50+ Influx DBs, but I will investigate it.
Re load on systems, APIs are built to be queries, the CheckMK UX will be using these APIs to render data constantly with little impact.
Livestatus data lives in RAM so that’s not a big deal. The RestAPI does not have the data, and in distributed monitoring the API needs to talk with the slave sites (who has the RRD data) (using livestatus connections) - So hitting multiple layers here is the real bottleneck, not if you want 1 or 10 metrics. I’m sure getting all metrics will be faster as you don’t have to add filters to EXCLUDE data.
That is only true for the status data not the metric data. Every time you fetch metric data with livestatus the core must go to the rrd files and retrieve the wanted content.
What is more important than the read of the file is that also a write command must be issued before you can read. This is needed to flush the rrd data from the rrdcached to the files before you have an actual state inside the file.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.