Closed bash-worth closed 3 years ago
Health-check should be done directly via Docker (it is also way to complex to build it in this script), but i could check if i can expose such value.
Maybe as part of the status sensor? That's how ha-dockermon exposes it.
E.g. "up 11 days (healthy)"
Thanks!
Came here for this. While I agree health data is directly via Docker, I'd like to build triggers around container health. It's quite common for my VPN container to go "Unhealthy".
That's exactly why I needed that functionality. In the meantime you can get container health status with ha_dockermon:
https://github.com/philhawthorne/ha-dockermon
Just set up a rest sensor to get the health status.
Requested merge from PR #51 to add support for the Health status of containers as a separate sensor/attribute. Adding it to the 'status' might break something for someone.
May be for a next version, it should be shown as the state of the container in stead of running.
Yes, separate sensor/attribute is the best way forward (as @rsegers says, it will break something else otherwise).
The #51 is merged, so I will close this ticket.
Thanks for creating this, it's working really well.
It would be great to also be able to monitor container health status in addition to state / status as a lot of the time containers keep on running when problems occur.
Thanks again.