Dynamic Host Monitoring mit 2.1 enterprise

“Dieses” Hosts…

Der Endpoint http://localhost:5000/mwscan_site/check_mk/api/1.0/domain-types/host_config/collections/all zeigt alle Hosts und mit jq ist das ein JSON mit 18056 Zeilen

Ich habe mal ein wenig gegraben, vielleicht hilft das:

{
    "title": "Server was about to send an invalid response.",
    "status": 500,
    "detail": "This is an error of the implementation.",
    "ext": {
        "errors": {
            "snmp_v3_credentials": [
                "Unknown field."
            ]
        },
        "orig": {
            "id": "host",
            "domainType": "host_config",
            "value": [
                {...},
            
                {
                    "domainType": "host_config",
                    "id": "s11",
                    "title": "s1x",
                    "links": [
                        {
                            "rel": "self",
                            "href": "http://checkmk.iznet/example_site/check_mk/api/1.0/objects/host_config/s11",
                            "method": "GET",
                            "type": "application/json",
                            "domainType": "link"
                        },
                        {
                            "rel": "urn:org.restfulobjects:rels/update",
                            "href": "http://checkmk.iznet/example_site/check_mk/api/1.0/objects/host_config/s11",
                            "method": "PUT",
                            "type": "application/json",
                            "domainType": "link"
                        },
                        {
                            "rel": "urn:org.restfulobjects:rels/delete",
                            "href": "http://checkmk.iznet/example_site/check_mk/api/1.0/objects/host_config/s11",
                            "method": "DELETE",
                            "type": "application/json",
                            "domainType": "link"
                        },
                        {
                            "rel": "urn:com.checkmk:rels/folder_config",
                            "href": "http://checkmk.iznet/example_site/check_mk/api/1.0/objects/folder_config/~switches",
                            "method": "GET",
                            "type": "application/json",
                            "domainType": "link",
                            "title": "The folder config of the host."
                        },
                        {
                            "rel": "urn:com.checkmk:rels/download",
                            "href": "http://checkmk.iznet/example_site/check_mk/api/1.0/domain-types/agent/actions/download/invoke?os_type=aix_tgz&host_name=s11",
                            "method": "GET",
                            "type": "application/json",
                            "domainType": "link",
                            "title": "Download the aix_tgz agent of the host."
                        },
                        {
                            "rel": "urn:com.checkmk:rels/download",
                            "href": "http://checkmk.iznet/example_site/check_mk/api/1.0/domain-types/agent/actions/download/invoke?os_type=linux_deb&host_name=s11",
                            "method": "GET",
                            "type": "application/json",
                            "domainType": "link",
                            "title": "Download the linux_deb agent of the host."
                        },
                        {
                            "rel": "urn:com.checkmk:rels/download",
                            "href": "http://checkmk.iznet/example_site/check_mk/api/1.0/domain-types/agent/actions/download/invoke?os_type=linux_rpm&host_name=s11",
                            "method": "GET",
                            "type": "application/json",
                            "domainType": "link",
                            "title": "Download the linux_rpm agent of the host."
                        },
                        {
                            "rel": "urn:com.checkmk:rels/download",
                            "href": "http://checkmk.iznet/example_site/check_mk/api/1.0/domain-types/agent/actions/download/invoke?os_type=linux_tgz&host_name=s11",
                            "method": "GET",
                            "type": "application/json",
                            "domainType": "link",
                            "title": "Download the linux_tgz agent of the host."
                        },
                        {
                            "rel": "urn:com.checkmk:rels/download",
                            "href": "http://checkmk.iznet/example_site/check_mk/api/1.0/domain-types/agent/actions/download/invoke?os_type=solaris_pkg&host_name=s11",
                            "method": "GET",
                            "type": "application/json",
                            "domainType": "link",
                            "title": "Download the solaris_pkg agent of the host."
                        },
                        {
                            "rel": "urn:com.checkmk:rels/download",
                            "href": "http://checkmk.iznet/example_site/check_mk/api/1.0/domain-types/agent/actions/download/invoke?os_type=solaris_tgz&host_name=s11",
                            "method": "GET",
                            "type": "application/json",
                            "domainType": "link",
                            "title": "Download the solaris_tgz agent of the host."
                        },
                        {
                            "rel": "urn:com.checkmk:rels/download",
                            "href": "http://checkmk.iznet/example_site/check_mk/api/1.0/domain-types/agent/actions/download/invoke?os_type=windows_msi&host_name=s11",
                            "method": "GET",
                            "type": "application/json",
                            "domainType": "link",
                            "title": "Download the windows_msi agent of the host."
                        }
                    ],
                    "members": {},
                    "extensions": {
                        "folder": "switches/",
                        "attributes": {
                            "tag_agent": "no-agent",
                            "snmp_community": [
                                "authPriv",
                                "sha",
                                "switchname",
                                "insertpwhere",
                                "DES",
                                "insertpwhere"
                            ],
                            ],
                            "tag_snmp_ds": "snmp-v2",
                            "meta_data": {
                                "created_at": 1636533532.6656003,
                                "created_by": "lars",
                                "updated_at": 1653549312.2342417
                            },
                            "snmp_v3_credentials": [
                                "authPriv",
                                "sha",
                                "switchname",
                                "insertpwhere",
                                "DES",
                                "insertpwhere"
                            ],
                            "ipaddress": "10.20.30.40"
                        },
                        "effective_attributes": null,
                        "is_cluster": false,
                        "is_offline": false,
                        "cluster_nodes": null
                    }
                }]
            }
        }
    }
}

Mag die API das Array in der Form nicht?