We are running a scheduled container environment (Nomad), so I was looking into leveraging the Docker autodiscovery provider to set up monitors dynamically (Heartbeat 7.0.1 run inside Docker with host networking). However, it appears that when a container exposes a port, but that port is not published, the Docker autodiscovery provider will still set up a monitor. This monitor will then permanently report failure due to the port not being reachable.
It would be convenient if monitors would not be set up unless the corresponding port is published to the host. Alternatively, it would be useful if the discovery data included a flag indicating whether the container port is published, so that the configured autodiscovery template could filter such containers using a conditional.
We are running a scheduled container environment (Nomad), so I was looking into leveraging the Docker autodiscovery provider to set up monitors dynamically (Heartbeat 7.0.1 run inside Docker with host networking). However, it appears that when a container exposes a port, but that port is not published, the Docker autodiscovery provider will still set up a monitor. This monitor will then permanently report failure due to the port not being reachable.
It would be convenient if monitors would not be set up unless the corresponding port is published to the host. Alternatively, it would be useful if the discovery data included a flag indicating whether the container port is published, so that the configured autodiscovery template could filter such containers using a conditional.