Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
themeRDark
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 VersionWeb 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 HelpREST API Documentation
Image Removed
Image Added


For the REST API queries, you will need to know what your metric IDs are. To find this information, first, go to MonitoringAll Host → and select your desired host. From here, click on the Check_MK service.

Image Added


Next, click on DisplayModify display options

Image Added


Now enable Show internal graph and metric IDs and click submit

Image Added


Scroll down this page and look for Service Metrics. You will see the Metric IDs on the right-hand side like below:

Image Added


Query via Web-API

Checkmk VersionWeb 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

...