Dynamic host management

CMK version: 2.1.0p19
OS version: Checkmk official docker image

Hi,

I’m getting crazy of this now. I’m trying to configure dynamic host management of docker containers. For now, just one container - squid. And it is working heavily randomly, mostly not working.

I’ve setup Connector:

I’ve setup Hostname translation for piggyback hosts:

When I run the connector, I get this nothing telling error:

16:16:34 INFO Started all connections
16:16:35 ERROR An exception occured
Traceback (most recent call last):
  File "/omd/sites/warp/lib/python3/cmk/cee/dcd/connectors/utils.py", line 217, in _execute_sync
    phase1_result = self._fetch_phase1_result_from_remote_site()
  File "/omd/sites/warp/lib/python3/cmk/cee/dcd/connectors/utils.py", line 255, in _fetch_phase1_result_from_remote_site
    phase_one_result = self._web_api.execute_phase1_result(
  File "/omd/sites/warp/lib/python3/cmk/cee/dcd/web_api.py", line 318, in execute_phase1_result
    return result.json()["extensions"]
KeyError: 'extensions'

Doesnt matter if I create new connector, or clone existing which is working fine.

However the piggyback data are created on satellite:

OMD[muonio]:~/tmp/check_mk/piggyback$ pwd
/omd/sites/muonio/tmp/check_mk/piggyback
OMD[muonio]:~/tmp/check_mk/piggyback$ ls
Muo-docker-squid/  checkmk_checkmk_muonio_1/

But in Checkmk portal no host is created. Then I do omd restart of site on satellite, the ‘Muo-docker-squid’ host is visible in portal, but still getting that above ‘extensions’ error.

When I change the rule in Hostname translation for piggyback hosts, it is not affected in portal, until I do again omd restart of site. Okay, I can live with that somehow.

Now, I would like to dynamically add squid from second server. We have same container running on two servers, and both are called volumes_squid_1.

image

I would like to go with option #2. I tried something like that, but thats doing nothing. No new containers are added, even after site restart. Documentation is very unclear with that.

I gave up on Dynamic host management of docker container. It just doesn’t work as it should and as it is written in docu.

I’ve manually created two hosts:
image

In properties, I’ve forced it to use only piggyback data:
image

Same is for second host:
image

Hostname translation, because squid container name is same on both hosts:

Why node1 is reporting, that piggy source is node1 and node2?

Why on node2 is ok correct, and shows only node2 as piggy source?

Why node1 reports piggy source is old, and it doesn’t refresh?
image

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.