kuhn-ruess / cmdbsyncer

Rule Based Syncronisation System with Checkmk and Ansible Support
MIT License
41 stars 9 forks source link

export to cmk broken since 2.1.0p14 #17

Closed orester closed 1 year ago

orester commented 2 years ago

Syncer Version: 1.3.2 CMK Version 2.1.0p14

export-cmk-v2 seems to be broken since CMK 2.1.0p14 has been released:

{
  "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 fi
les in case you have modified them by hand and run cmk-update-config. If the problem persists afterwards, please report a bug.",
  "ext": {
    "errors": {
      "bake_agent_package": [
        "Not a string, but a bool",
        "Tag group name must start with 'tag_'",
        "Unknown field."
      ]
    },
    "debug_data": {
      "orig": {
        "id": "folder_config",
        "domainType": "folder_config",
        "links": [
          {
            "rel": "self",
            "href": "http://cmk.xxx.yyy/ttt/check_mk/api/1.0/domain-types/folder_config/collections/all",
            "method": "GET",
            "type": "application/json",
            "domainType": "link"
          }
        ],
        "value": [
          {
            "domainType": "folder_config",
            "id": "~",
            "title": "Main",
            "links": [
              {
                "rel": "self",
                "href": "http://cmk.xxx.yyy/ttt/check_mk/api/1.0/objects/folder_config/~",
                "method": "GET",
                "type": "application/json",
                "domainType": "link"
              },
              {
                "rel": "urn:org.restfulobjects:rels/update",
                "href": "http://cmk.xxx.yyy/ttt/check_mk/api/1.0/objects/folder_config/~",
                "method": "PUT",
                "type": "application/json",
                "domainType": "link"
              },
              {
                "rel": "urn:org.restfulobjects:rels/delete",
                "href": "http://cmk.xxx.yyy/ttt/check_mk/api/1.0/objects/folder_config/~",
                "method": "DELETE",
                "type": "application/json",
                "domainType": "link"
              }
            ],
            "members": {},
            "extensions": {
              "path": "/",
              "attributes": {
                "meta_data": {
                  "created_at": 1656425763.4117873,
                  "updated_at": 1666003637.8185098,
                  "created_by": null
                },
                "bake_agent_package": true
              }
            }
          },
          {
            "domainType": "folder_config",
            "id": "~leanops",
            "title": "leanops",
            "links": [
              {
                "rel": "self",
                "href": "http://cmk.xxx.yyy/ttt/check_mk/api/1.0/objects/folder_config/~leanops",
                "method": "GET",
                "type": "application/json",
                "domainType": "link"
              },
...

Might that be already fixed in Syncer release 2.x?

Many thx & br Oliver

Bastian-Kuhn commented 2 years ago

This Bug is since p13 and you can fix it by editing the .wato file in the Main Directory and remove bake_agent_package there