{\"configuration_connection\": {\"is_trusted\": [\"Unknown field.\

CMK version:
2.2.0p37

Ansible Collection
“version”: “7.5.0”

OS version:
Appliance 1.1.17

Error message:

Suddenly we receive this “Unknown field” error. Any idea where it comes from?

574:
TASK [forvia.hydra.test.checkmk : Create connection in distributed Monitoring for site AUG] ***
 575:
fatal: [hostname -> localhost]: FAILED! => {"changed": false, "content": "", "debug": "", "etag": "", "http_code": 400, "msg": "400 - Bad request: Parameter or validation failure Details: b'{\"title\": \"Bad Request\", \"status\": 400, \"detail\": \"These fields have problems: site_config\", \"fields\": {\"site_config\": {\"configuration_connection\": {\"is_trusted\": [\"Unknown field.\"]}}}}'"}
 576:
hostname     : ok=83   changed=12   unreachable=0    failed=1    skipped=11   rescued=0    ignored=1

My Ansible code:

- name: "Create connection in distributed Monitoring for site {{ sitecode }}"
  checkmk.general.site:
    server_url: "{{ checkmk_master_url }}"
    validate_certs: true
    site: "{{ checkmk_master_site }}"
    automation_user: "{{ checkmk_automation_user }}"
    automation_secret: "{{ __checkmk_automation_key }}"
    site_id: "{{sitecode}}"
    site_connection:
      site_config:
        status_connection:
          connection:
            socket_type: tcp
            port: 6557
            encrypted: true
            host: "{{ ansible_default_ipv4['address'] }}"
            verify: true           
          proxy:
            use_livestatus_daemon: "with_proxy"  
            global_settings: true
          connect_timeout: 2
          status_host:
            status_host_set: "disabled"
          url_prefix: "https:/{{ ansible_default_ipv4['address'] }}/{{ sitecode }}/"
        configuration_connection:
          enable_replication: true
          url_of_remote_site: "https://{{ansible_default_ipv4['address']}}/{{ sitecode }}/check_mk/"
          ignore_tls_errors: true
        basic_settings:
          site_id: "{{ sitecode }}"
          alias: "Hydra Head : {{ countryname }}, {{ mdm_longname }} {{ sitecode }}"
    state: "present"
  delegate_to: localhost
  become: false

Thanks

Mike

Hey @mike1098 and thanks for raising this. The issue is rather simple (but inconvenient for you): Werk 17998 introduced a new option in Checkmk 2.3.0p39 and newer. We introduced the option is_trusted in the collection with version 6.2.2 (and defaulted it to False), which also dropped support for EOL Checkmk 2.2.
Your quick fix: Pin the collection to version 7.2.1 and update to Checkmk 2.3 soon. With recent Checkmk 2.3 (and newer), all recent collection versions will work.
While we might be able to fix the collection, I cannot say, when we could get to that. So I hope the “quick fix” is good enough to get you to Checkmk 2.3.
What do you think?

1 Like

Hi @Robin,

We did an update of Satellite and due to that I also updated to latest ansible collections. To be honest I expected such issues but all roles ran through. I guess because after these tests I did a modification of the site connection encryption in the GUI the Ansible task failed to turn it back to what it was before.

No issue to switch back to 7.2.1. I was prepared for that and design is made in a way to make it easy to switch between the collection versions.
But looking in the documentation for 7.2.1 it contains the option is_trusted. Is 7.2.1 really supporting checkmk 2.2 or do I need to go back to 6.2.1 before the change?

Upgrade to 2.3 is on its way but first we have to update all remote sites to RHEL9 which is a challenge on its own.

Thanks

Mike

Yes, this version should work, because 7.2.2 introduced a default value for is_trusted and that is what caused your issues.

Yeah, I do appreciate the challenge, so fingers crossed you can get there soon. :crossed_fingers:

1 Like

Maybe slightly off-topic, but we’ve also fully automated the migration from our old CentOS 7 systems to RHEL 9 using Ansible. This keeps monitoring downtime at remote sites very low—typically just 2–3 minutes.

The Checkmk Ansible Collection plays a crucial role in this process. It even allows us to automate improvements to connection settings and the migration from folder property settings to rule-based configurations.

Many thanks to the Checkmk Ansible team for providing such an excellent tool. It has been a great help in streamlining and standardizing our migrations.

greets

Mike

1 Like

One heart as a reaction is not enough: :green_heart: :green_heart: :green_heart:

Thank you so much for the kind feedback, it really means a lot!

1 Like