...
Code Block | ||||
---|---|---|---|---|
| ||||
OMD[mysite]:~$ lq "GET services\nFilter: host_name = mysite\nFilter: service_description = Filesystem /\nColumns: host_name\nColumns: service_description\nColumns: rrddata:m1:fs_used.max,1024,/:1614839543:1614929543:30\nOutputFormat: python" [[u"mysite",u"Filesystem /",[1614839400,1614931200,1800,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,333.982,334.178,334.465,334.638,334.773,334.923,335.082,335.249,335.361,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,336.493,336.673]]] |
Query via
...
REST-API
Warning |
---|
With Checkmk 2.1, announced by Werk #13640, the Web API was deprecated. This release now (Checkmk 2.2) removes the Web API. We recommend migrating all existing scripts that use the Web API to the REST API. |
...
Checkmk Version | Web or Rest API |
---|---|
2.0.0p* | Web-API |
2.1.0p* | Web-API |
2.2.0p* | REST - API |
To access the REST-API Documentation, click on Help → REST API Documentation
For the REST API queries, you will need to know what your metric IDs are. To find this information, first, go to Monitoring → All Host → and select your desired host. From here, click on the Check_MK service.
Next, click on Display → Modify display options
Now enable Show internal graph and metric IDs and click submit
Scroll down this page and look for Service Metrics. You will see the Metric IDs on the right-hand side like below:
Query via Web-API
Checkmk Version | Web or Rest API |
---|---|
2.0.0p* | Web-API |
2.1.0p* | Web-API |
2.2.0p* | REST-API |
Custom graph (Web-API)
With this example, you can query the metrics of a custom graph in Checkmk
...