CheckMK Update 2.1.0p20 - REST API not working correctly

CMK version: 2.1.0p20 Enterprise
OS version: Ubuntu 20.04 LTS

Error message:
Using the REST API (even directly via CheckMK WebUI) results in browser (Firefox on Arch Linux / MacOS) loading, complaining that this site is slowing down Firefox, freezing the site and after a long delay, an Error 500 Status is returned in the response body.

This is the response body (shortened):

{
  "title": "Mismatch between endpoint and internal data format. ",
  "status": 500,
  "detail": "This could be due to invalid or outdated configuration, or be an error of the implementation. Please check your *.mk files in case you have modified them by hand and run cmk-update-config. If the problem persists afterwards, please report a bug.",
  "ext": {
    "errors": {
      "tag_alerthandler_nginx": [
        "Field may not be null."
      ]
    },
...

The REST API worked ok today, tested about 5 - 6 hours ago.
The only 2 things that had been changed were:

  • Installed UniFi Controller via CheckMK Exchange (removed it already, REST API still not working)
  • CheckMK Update 2.1.0p19 → 2.1.0p20

I did not find any significant or (at least from my understanding) relevant changes to the REST API in the changelog.
For authentication via REST API, we use the header bearer HTTP Auth (which worked when I tested it today after the update in the interactive REST GUI, but now the REST GUI just doesn’t open anymore).
I do not think it is related to https://checkmk.com/werk/15170, as the option mentioned in the werk is not set in our monitoring environment.

Could be related to Querying Status Data - REST-API - Blob Field, though the linked issue is about CheckMK 2.0.0p31.

Does anybody else experience problems with the REST API after upgrading?

Best regards,
pixelpoint

Is alerthandler_nginx a checkbox tag group (i.e. a tag group with only one choice)?

This has given me trouble in the past with the API not able to handle this case.

Is alerthandler_nginx a checkbox tag group (i.e. a tag group with only one choice)?

Yes, we have ~15 of those (+ some aux tags for easier management).
I’ve had these for a while now, way before the CheckMK 2.1.0 Upgrade (I’m not 100% sure, but I might’ve had one or two of them even back in CheckMK 1.6).
I have definitely used them before the Upgrade to 2.1.0p20 and never had any REST API problems.

Do you think removing all of them would maybe help?

Best regards,
pixelpoint

No. Fixing the REST API would help. :eyes: @LaMi

A pretty similar, if not identical issue, came up in a support ticket for CheckMK version 2.0.0.
I’ll take a quick look at reproducing it for 2.1.0 and the daily build as well, using the same steps.

Might follow up if I need additional info.

Kind regards
Teresa

5 Likes

I just upgraded to CheckMK 2.1.0p21 and the REST API seems to be working again.
Obviously, I have not tested everything there is to test, but we generate our Ansible Inventory to manage our 100+ Linux-Servers directly from the CheckMK REST API and that seems to work again :slight_smile:

I will mark this as solved with this post being the solution.

Thank you all for your time and help!

Best regards,
pixelpoint

3 Likes

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.