-
Notifications
You must be signed in to change notification settings - Fork 1.7k
http_server/health: Implement throughput health check #5773
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
base: master
Are you sure you want to change the base?
Conversation
ref: fluent/fluent-bit#5773 Signed-off-by: Thiago Padilha <[email protected]>
ref: fluent/fluent-bit#5773 Signed-off-by: Thiago Padilha <[email protected]>
Docs PR: fluent/fluent-bit-docs#850 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything except the lacking flb_free
calls is only relevant if we plan to upstream this code.
5860b2e
to
2240019
Compare
a9b0cfb
to
447be26
Compare
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
Signed-off-by: Thiago Padilha <[email protected]>
Use a ring buffer for storing samples as per Leonardo's suggestion. Signed-off-by: Thiago Padilha <[email protected]>
Move struct definitions to header. Signed-off-by: Thiago Padilha <[email protected]>
447be26
to
c280b8d
Compare
@lecaros rebase done |
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
Signed-off-by: Thiago Padilha [email protected]
This enhances the
/api/v1/health
endpoint with an optional throughput check.hc_throughput
is used to enable the check (disabled by default). Note that there are no defaults, ifhc_throughput
is provided, then all other options must also be configured.hc_throughput_input_plugins
: Comma separated list of input plugins used to calculate input ratehc_throughput_output_plugins
: Comma separated list of output plugins used to calculate output ratehc_throughput_ratio_threshold
: Ratio of output rate and input rate at which we consider the throughput to have problems.hc_throughput_min_failures
: Minimum count at which ratio is below threshold for the health check to return error.Example:
In the above example, we would consider http.0/tail.0 for output/input rate calculation, and if the ratio is below 0.1 for 60 consecutive checks, then the health check would return an error. Note that we use the health check period (configured by
hc_period
) which has a default value of 1 second. So in this case we would only return an error if ratio is below threshold for 1 minute.@agup006 @lecaros
Enter
[N/A]
in the box, if an item is not applicable to your change.Testing
Before we can approve your change; please submit the following in a comment:
If this is a change to packaging of containers or native binaries then please confirm it works for all targets.
Documentation
Backporting
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.