-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
healthcheck command line script #40
Comments
I am not sure whether we should introduce an additional http endpoint for health data. However, we could introduce some mqtt heartbeat message, which gets repeatedly published? Alternatively, we could subscribe to an mqtt topic where we listen for incoming commands. Such command could be to publish a status/health message or to publish some packet statistics? |
@romor, I had the idea to propose a mix of your two ideas in a kind of availibility message. |
Publishing a message into the MQTT broker to test the enocean-mqtt container may be an idea only if this test is executed from a script inside the enocean-mqtt container. A simple command returning 0 if it is ok, and 1 if it is not. The HTTP endpoint was just an idea, but any command line (wget/HTTP, bash script, python script) that can be executed inside the container is ok. Simple command lines examples from my docker-compose for other services:
|
Hi,
Just found this interesting project to replace the direct connection between my EnOcean dongle and Home Assistant (running in a docker container). I already use a Mosquitto MQTT broker with Zigbee & Zwave. So having a similar gateway is great. My first try with enocean-mqtt works well. Thanks :-)
I have an enhancement request: Would it be possible to add an HTTP endpoint (like /health) to the python project, so it would be possible to configure an healthcheck on the enocean-mqtt container (in docker-compose)?
If not (for any good reason like lightweight, complexity etc.) how is it possible to check the health of enocean-mqtt ?
Regards
Chris
PS: I am not a python developer, but found an example in https://snyk.io/blog/best-practices-containerizing-python-docker/ (section 5). It may help and give some ideas.
The text was updated successfully, but these errors were encountered: