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

in_http: add new /health endpoint #10020

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

in_http: add new /health endpoint #10020

wants to merge 1 commit into from

Conversation

edsiper
Copy link
Member

@edsiper edsiper commented Feb 27, 2025

This PR adds the /health endpoint that works through the GET method so remote clients can check if the http service is up or not.

When accessed, it returns a JSON response like this:

 {
   "status": "ok",
   "message": "I can only show you the door. You're the one that has to walk through it.",
   "timestamp": "2025-02-27T03:15:42.477701772Z"
 }

Fixes #10003


Fluent Bit is licensed under Apache 2.0, by submitting this pull request I understand that this code will be released under the terms of that license.

This PR adds the /health endpoint that works through the GET method so remote
clients can check if the http service is up or not.

When accessed, it returns a JSON response like this:

 {
   "status": "ok",
   "message": "I can only show you the door. You're the one that has to walk through it.",
   "timestamp": "2025-02-27T03:15:42.477701772Z"
 }

Signed-off-by: Eduardo Silva <[email protected]>
cfl_sds_printf(&msg,
"{\n"
" \"status\": \"ok\",\n"
" \"message\": \"I can only show you the door. You're the one that has to walk through it.\",\n"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this message?

Maybe we can return the version information instead?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes please, version info would be great

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this message?

The Matrix

Maybe we can return the version information instead?

makes sense

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

Successfully merging this pull request may close these issues.

HTTP Input GET method should return "alive" or similar
3 participants