Dear CheckMK community,
We use the CheckMK REST API to populate our ansible playbook inventory to manage our linux based servers.
I have just implemented a way to synchronize all SSH keys on all linux servers with the CheckMK REST API.
Now I do still have a problem: This only works for calling single hosts, not groups of hosts.
Seeing as there are hostgroups in CheckMK, I wanted to get all members of a hostgroup from the API.
In the CheckMK REST API Interactive GUI in the Hostgroups Table declaration, it lists the variable members (list) with the information A list of all host names that are members of the hostgroup.
When accessing the API on the corresponding endpoints, the members attribute is always empty?
/objects/host_group_config/GROUPNAME
returns infos on group (links, id, title, alias) and an emptymembers
list/domain-types/host_group_config/collections/all
returns a list of the same information about all groups, emptymembers
included/objects/host_config/HOSTNAME
returns infos on a host but no info on group membership
While searching the forum, I also found this thread talking about getting this info is not possible?
Now I’m just a little confused and I’d like clarification.
Is it possible to get the members of a group or some kind of group-membership information in the REST API or is it not?
It shouldn’t be a permission issue or something alike if I can see the host-members of a group in the Host Groups view in CheckMK, right?
Best regards,
pixelpoint