Dear Checkmk community, especially the coding fans among you,
on the Checkmk conference, we shared that we will be building new development APIs for some important areas, where there are currently no formal APIs. See also [Nov 2023] Checkmk 2.3 roadmap update
We recently shared updates on this on the Checkmk Partner Day and feedback was that we should also share further information here. This is an initial post, and I plan to add further info here once relevant.
What APIs are we talking about:
We are building these new APIs based on an analysis of all MKPs on the Checkmk Exchange.
Consequence: if you are doing something, which is not in there, we donât know about this. Therefore, YOU definitely need to test the APIs early on.
Why will you benefit from these APIs?
Rulespec API
Scope:
- Rulesets in special agents, active checks, for check plug-ins, HW/SW inventory plug-ins.
- Maybe: Rulesets in notification plug-ins, host monitoring rules
You are affected, if you have ⊠created a ruleset:
grep -Rl "rulespec_registry.register" ~/local
(from within a site)
Example: checkmk/cmk/plugins/prism/rulesets/protection_domains.py at master · Checkmk/checkmk · GitHub
Status: Looking good. We have migrated a couple of simple rulesets already. There is still some work to do in the API.
Server-side calls API
Scope:
- Special agents
- Active checks
You are affected, if you have created one of:
grep -e 'active_check_info' -e 'special_agent_info' ~/local/share/check_mk/checks/*
(from within a site)
This is what it impacts.
Example: checkmk/cmk/plugins/elasticsearch/server_side_calls at master · Checkmk/checkmk · GitHub
Status: Looking very good. We already migrated a lot of our own code succesfully.
Graphing API
Scope:
- Metric definitions
- Graph definitions
- Perf-O-Meter definitions
You are affected, if you have created one of:
grep -e 'metric_info' -e 'graph_info' -e 'perfometer_info' ~/local/share/check_mk/web/plugins/metrics
(from within a site)
Currently in progress. Will add further info later here for this
New file locations!
My favorite change is this though, this however might still be subject to change. I can find now all plugins and the corresponding rulesets and checks in one place: checkmk/cmk/plugins at master · Checkmk/checkmk · GitHub
This is also where you can find all plug-ins which we already migrated!
Where is the API documentation?
You can find this inside a 2.3.0 site. For this please use a daily build. You can find them in the download archive for Checkmk daily builds. Keep in mind that the 2.3.0 daily builds are not stable. This is our development branch!
Go in the Checkmk site to âHelp â Check plugin API referenceâ. Then you will find the current state of the API documentation.
Our migration plan:
- Rulesets and Metrics
- Migrate a couple of simple and complex ones to cover all functionality
- Wonât migrate all manually, not feasible
- Migration of all will only be done, if it is scriptable. Then we will share the script.
- Migrate a couple of simple and complex ones to cover all functionality
- Special agents and active checks: Migrate all
Your To-Dos:
- Use Checkmk 2.3 to migrate all extensions to APIs
- Must for Special Agents and active checks API as current methods will be removed in 2.4
- Will (likely) save you any worries when upgrading to 2.4
- Effort is reasonable as not a fundamental change as with agent-based API (for check plug-ins)
- If you can, migrate even before and let us know, if APIs are sufficient
- We only know our code and MKPs on exchange.checkmk.com
We are happy to also receive your feedback in this thread!
I will also update this thread based on feedback, new learnings and so.
Of course for Checkmk 2.3, we plan to provide more resources as well. This is basically a early hint into it.
This werk describes the new APIs comprehensively: New APIs for plugin development
The API documentation can be found within your Checkmk 2.3.0 site under Help â Plugin API references and looks like this: