Skip to content
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

feat: Enable fluentbit healthcheck #598

Merged
merged 3 commits into from
Mar 7, 2023

Conversation

momoXD007
Copy link
Contributor

What this PR does / why we need it:

This PR allows to enable the http Healthcheck that is already implemented in fluentbit and described here: https://docs.fluentbit.io/manual/administration/monitoring#health-check-for-fluent-bit . Since the functionality to add liveness probes already exists it would allow users to setup the liveness probes of fluentbit pods in a way that they query the integrated healthcheck.
Users of the fluent-operator could use this to increase the observability and reliability of their fluentbit instances.
Therefore I believe that this PR is loosely related to #321 . In my eyes it is related in the sense that it allows to enable the healthcheck and theoretically also to expose the healtcheck which could be queried by external tools or setup as kubernetes livenessProbe.

I did not test this in action yet.

Which issue(s) this PR fixes:

RelatesTo #321

Does this PR introduced a user-facing change?

With this update fluentbit can be configured to run a HealthCheck. Please be aware: Enabling the healthcheck here does not configure kubernetes to query it. To use the healthcheck as a liveness probe it needs to be enabled with the steps below AND a liveness probe that does http requests to the address below need to be set up separately.
The healthcheck is a simple Http endpoint on port 2020. From inside the pod it is available by querying http://127.0.0.1:2020/api/v1/health . It will return 200 in case all is good and 500 if not. This healthcheck is a standard fluentbit feature and configurable through the fluent operator. To enable and configure the Healthcheck adapt the values hcErrorsCount, hcRetryFailureCount, hcPeriod and set healthCheck to true. 

Additional documentation, usage docs, etc.:

For details on the fluentbit HealthCheck please check the official documentation here: https://docs.fluentbit.io/manual/administration/monitoring#health-check-for-fluent-bit

Signed-off-by: Michael J. Wieneke <m.wieneke@sap.com>
Signed-off-by: Michael J. Wieneke <m.wieneke@sap.com>
fluentbitconfig will not enable kubernetes liveness probes automatically

Signed-off-by: Michael J. Wieneke <m.wieneke@sap.com>
@momoXD007 momoXD007 force-pushed the enable_fluentbit_healthcheck branch from 5a17ba6 to 9be6645 Compare March 6, 2023 07:58
@wenchajun wenchajun marked this pull request as ready for review March 6, 2023 09:06
@benjaminhuo
Copy link
Member

Thanks @momoXD007 for the contribution!

@benjaminhuo benjaminhuo merged commit 1fb6689 into fluent:master Mar 7, 2023
@benjaminhuo
Copy link
Member

benjaminhuo commented Mar 7, 2023

I'm going to invite you as fluent operator maintainer @momoXD007
https://github.com/fluent/fluent-operator/invitations

@momoXD007
Copy link
Contributor Author

I'm going to invite you as fluent operator maintainer @momoXD007
https://github.com/fluent/fluent-operator/invitations

thank's a lot.
Since I contribute to fluent-operator as part of my job, I will need to clarify with my employer if I am allowed to accept.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants