New host gets stuck in wrong bakery configuration

CMK version:
CEE 2.2p40
OS version:
Oracle Linux 8

Our agent bakery has a number of configurations, presumably enumerated based on agents rules we have created.

It starts with a default config, that does not have an updater configured. We’re not really interested in this.

Next is a config that has the updater config, but doesn’t have Linux- or Windows-specific config.

Then we have a config with custom files for windows. This is based on the host label cmk/os_family:windows.

Next is the same for Linux, with its custom files. Again, we use host label cmk/os_family:linux to select this for Linux systems.

Now when we create a new host and the dynamic host management picks it up and adds it in, the host doesn’t have a cmk/os_family label, so it ends up in the non-specific config with just the updater settings, and no custom files.

Even after we’ve finished setting up the host and done the first service discovery and added the discovered host labels, it does not move to the custom Windows config.

Only after re-baking the agents (even though there’s been no changes to the bakery config) does it realise that the host belongs to a different config, and supply the correct agent to it.

Is there something we’re doing wrong, is this “working as designed”, or is there a bug here?

Hi Abertay,

i think the problem is, that the necessary cmk/os_family labels for these hosts are only present when the checkmk agent is already installed on the host and you have done a discovery of that host.
Only after that the correct packages are the built for these hosts.
So maybe you can assign your own windows label with the ruleset “host labels” to these hosts based on conditions like hostnames, regex or folders upfront which you can then use in the bakery rule to create the correct packages before the agent is even installed on the host.

You can try to activate the global setting “Automatically create monitoring agents” but i saw that sometimes changes in the labels are not being reflected in the bakery to change packages and this was only solved when clicking “bake agents” although this was not orange, indicating that a change is necessary.

1 Like

Works as designed I would say.

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.