homeassistant-portainer
homeassistant-portainer copied to clipboard
[Feature] Implement health-checks as status
Is your feature request related to a problem? Please describe.
I have implemented health-checks for most of my containers, which is really helpful when trying to solve problems before they affect production. This feature is not available via the integration, thus making it impossible to reflect the actual status in home assistant (running ≠ healthy).
Describe the solution you'd like
Implement (if possible) health status, so that the dashboard for example could show all containers that are unhealthy.
Describe alternatives you've considered
Additional context
As portioner seems to act like a reverse-proxy against the docker, this could also work:
From what I was able to find in the documentation for /containers/json
this does not actually include the health status:
"State": "Exited",
"Status": "Exit 0",
Digging deeper, the documentation for containers/{id}/json
does actually contain information about container health:
"State": {
"Error": "",
"ExitCode": 9,
"FinishedAt": "2015-01-06T15:47:32.080254511Z",
"Health": {
"Status": "healthy",
"FailingStreak": 0,
"Log": []
},
So this would be a possible solution... alternatively /events
seems to contain this kind of information... but I don't know how practical this kind of stream would be.
This will be great, to become build block for a future switch support, because running works, but with healthy status when supported will be really nice.