Automate based on docker entities and events?

Is there any integration which would enable me to monitor and automate based on a docker system? There are tons of observable entities there, so one would think this should be doable.

As an example off the top of my head, automations could happen when a container/service stops or gets restarted, and maybe I could access the hostname of the node running a specific sercice within a swarm, as an entity attribute.

there is Monitor Docker (HACS) and ha-dockermon that can provide that sensor/data you require. I use it both for my NUC (runs HA dockers) and Syno (other dockers)

Thank you, I’ll look into it. But at first glance, looks exactly like what I was looking for!