1. Introduction
Checkmk now offers a whole host of diverse interfaces, above all the REST API, with which you can do a great deal of what is also possible via the web interface. However, there are also APIs for check plug-ins, the hardware/software inventory, the Agent Bakery and so on. There are articles, references and other resources for all of these interfaces, distributed throughout this User Guide, the website and Checkmk itself.
In this article, we will provide an overview of all interfaces and resources and give some tips on general handling. Many links in this article are redundant, as the information is intended to serve three different approaches or questions:
Which APIs does Checkmk provide?
Which API-relevant articles can be found in the User Guide?
What API-relevant resources are available in Checkmk?
The most important interface is undoubtedly the Checkmk REST API, which can be used to do almost everything from a programming perspective that can also be performed via the web interface.
The interactive REST API GUI offers a quick, practical introduction to the REST API. Here you can send and, optionally, modify predefined queries. You can find the GUI in Checkmk itself via Help > Developer resources > REST API interactive GUI. |
The second major interface is the Plugin APIs for developing your own extensions. Depending on your experience, you can start here with our introductory article or the reference, which you can again find directly in Checkmk itself: Help > Developer resource > Plug-in API references.
In the tables below you will find these APIs, but also less familiar interfaces, such as for the hardware/software inventory, sub-interfaces for check plug-in development, such as the explicit Graphing API, as well as quasi-interfaces, such as the output format of local checks, the simple, script-based precursor to full-blown plug-ins.
2. APIs in Checkmk
API | User Guide | Web | Description |
---|---|---|---|
REST API |
Functionally a subset of the web interface. |
||
Check API |
Coding check plug-ins. |
||
Bakery API |
In Checkmk: |
Include check plug-ins in the agent bakery. |
|
Server-side calls API |
tbd |
In Checkmk: |
Develop active checks and special agents. |
Graphing API |
Customizing the metric displays in the agent-based check plug-in article |
In Checkmk: |
Include metrics, graphs, Perf-O-Meters. |
Rulesets API |
Rule sets for check parameters in the agent-based check plug-in article |
In Checkmk: |
Develop your own rule sets. |
DCD API |
tbd |
In Checkmk: |
Custom connectors for the Dynamic Configuration Daemon (DCD). |
HW/SW API |
n.a. |
Web API for querying inventory data. |
|
Livestatus |
Retrieving status data via Livestatus, Livestatus command reference |
n.a. |
Direct retrieval of status data via Livestatus Query Language (LQL). |
Event Console interface |
The status interface of the Event Console |
n.a. |
Access to internal status and execution of commands via Unix socket. |
Local checks |
n.a. |
'Mini interface' for your own script-based checks. |
3. Articles in the User Guide
API area | User Guide | Description |
---|---|---|
Automation |
Description of the REST API as well as its documentation and possible uses. |
|
An overview of the data interface for host and service information. |
||
All tables, headers, filters and operators. |
||
Description of the inventory’s own web API for external access. |
||
The status interface of the Event Console |
Data can be read from the Event Console and commands can be sent via Unix socket and a subset of the Livestatus protocol. |
|
Programming |
Overview article with all possibilities for extensions and links to further information. |
|
Detailed description of how to develop a check plug-in. |
||
Detailed description of the development of a check plug-in for SNMP data. |
4. Resources in Checkmk
In Checkmk | Description |
---|---|
Help > Developer resources > Plug-in API references |
A Sphinx-based reference of all APIs that are relevant for the development of Check plug-ins. |
Help > Developer resources > REST API documentation |
ReDoc/OpenAPI-based reference for all Check-relevant queries, including code examples for Requests (Python), Urllib (Python), httpie and curl. |
Help > Developer resources > REST API interactive GUI |
Interactive web interface for testing all API endpoints, including feedback directly on the page. |
Help > Developer resources > Plug-in API references > Agent based ("Check API") |
In the section Version 2 > New in this version you will find important information for the migration of old plug-ins to the current API version. |
5. Resources on the web
Resource | Description |
---|---|
Video tutorial (in English) with practical examples for using the REST API, for example for setting scheduled downtimes. |
|
Curl examples in the Checkmk Knowledge Base for concrete, e.g. AND-linked queries. |
|
In the Checkmk plug-in store you will find many practical implementations of the APIs including source code. |