File tree Expand file tree Collapse file tree 3 files changed +286
-15
lines changed Expand file tree Collapse file tree 3 files changed +286
-15
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,11 @@ struct flb_config {
171171 int hc_errors_count ; /* health check error counts as unhealthy*/
172172 int hc_retry_failure_count ; /* health check retry failures count as unhealthy*/
173173 int health_check_period ; /* period by second for health status check */
174+ int hc_throughput ; /* if throughput check is enabled */
175+ char * hc_throughput_input_plugins ; /* which input plugins should be considered for checking throughput */
176+ char * hc_throughput_output_plugins ;/* which output plugins should be considered for checking throughput */
177+ double hc_throughput_ratio_threshold ; /* output/input ratio threshold to consider a failure */
178+ int hc_throughput_min_failures ; /* minimum amount of failures to cause error condition */
174179#endif
175180
176181 /*
@@ -298,6 +303,11 @@ enum conf_type {
298303#define FLB_CONF_STR_HC_ERRORS_COUNT "HC_Errors_Count"
299304#define FLB_CONF_STR_HC_RETRIES_FAILURE_COUNT "HC_Retry_Failure_Count"
300305#define FLB_CONF_STR_HC_PERIOD "HC_Period"
306+ #define FLB_CONF_STR_HC_THROUGHPUT "HC_Throughput"
307+ #define FLB_CONF_STR_HC_THROUGHPUT_IN_PLUGINS "HC_Throughput_Input_Plugins"
308+ #define FLB_CONF_STR_HC_THROUGHPUT_OUT_PLUGINS "HC_Throughput_Output_Plugins"
309+ #define FLB_CONF_STR_HC_THROUGHPUT_RATIO_THRESHOLD "HC_Throughput_Ratio_Threshold"
310+ #define FLB_CONF_STR_HC_THROUGHPUT_MIN_FAILURES "HC_Throughput_Min_Failures"
301311#endif /* !FLB_HAVE_HTTP_SERVER */
302312
303313/* DNS */
Original file line number Diff line number Diff line change @@ -106,6 +106,25 @@ struct flb_service_config service_configs[] = {
106106 FLB_CONF_TYPE_INT ,
107107 offsetof(struct flb_config , health_check_period )},
108108
109+ {FLB_CONF_STR_HC_THROUGHPUT ,
110+ FLB_CONF_TYPE_BOOL ,
111+ offsetof(struct flb_config , hc_throughput )},
112+
113+ {FLB_CONF_STR_HC_THROUGHPUT_IN_PLUGINS ,
114+ FLB_CONF_TYPE_STR ,
115+ offsetof(struct flb_config , hc_throughput_input_plugins )},
116+
117+ {FLB_CONF_STR_HC_THROUGHPUT_OUT_PLUGINS ,
118+ FLB_CONF_TYPE_STR ,
119+ offsetof(struct flb_config , hc_throughput_output_plugins )},
120+
121+ {FLB_CONF_STR_HC_THROUGHPUT_RATIO_THRESHOLD ,
122+ FLB_CONF_TYPE_DOUBLE ,
123+ offsetof(struct flb_config , hc_throughput_ratio_threshold )},
124+
125+ {FLB_CONF_STR_HC_THROUGHPUT_MIN_FAILURES ,
126+ FLB_CONF_TYPE_INT ,
127+ offsetof(struct flb_config , hc_throughput_min_failures )},
109128#endif
110129 /* DNS*/
111130 {FLB_CONF_DNS_MODE ,
You can’t perform that action at this time.
0 commit comments