Would you like a PR for having a default HEALTHCHECK in place. I'm more than happy to submit one.
Filebeat example:
HEALTHCHECK --interval=5s --timeout=3s \
CMD ps aux | grep '[f]ilebeat' || exit 1
The above HEALTHCHECK is more for consistency in monitoring tools. As pointed out by @exekias adding instrumentation to beats may be required. We're compiling a list of what would constitute an unhealthy state, please post below if you have ideas.
A healthcheck would probably make sense, but we may need to add some instrumentation to beats for it.
Not sure if your proposed check would work as filebeat (or any other beat) is the entrypoint, that means the container dies with it
You are correct @exekias. The above healthcheck, is more for monitoring consistency. Is it possible for beats to be unhealthy and be running (assuming the syntax of the config is fine)? Maybe we should draft out which situations would constitute unhealthy then look into what approach would fit best. It may be a simple as grepping the output.
When this PR gets through we may expose the results as an HTTP endpoint: https://github.com/elastic/beats/pull/4590
I have transferred the issue, as beats-docker repo is going to be archived.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue doesn't have a Team:<team> label.
Most helpful comment
When this PR gets through we may expose the results as an HTTP endpoint: https://github.com/elastic/beats/pull/4590