Skip to content

Commit

Permalink
Changing client healthcheck config cli argument (#6414)
Browse files Browse the repository at this point in the history
Signed-off-by: alanprot <[email protected]>
  • Loading branch information
alanprot authored Dec 10, 2024
1 parent 68012ec commit 8d79acc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions docs/blocks-storage/querier.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,17 +209,17 @@ querier:
healthcheck_config:
# The number of consecutive failed health checks required before
# considering a target unhealthy. 0 means disabled.
# CLI flag: -querier.store-gateway-client.unhealthy-threshold
# CLI flag: -querier.store-gateway-client.healthcheck.unhealthy-threshold
[unhealthy_threshold: <int> | default = 0]

# The approximate amount of time between health checks of an individual
# target.
# CLI flag: -querier.store-gateway-client.interval
# CLI flag: -querier.store-gateway-client.healthcheck.interval
[interval: <duration> | default = 5s]

# The amount of time during which no response from a target means a failed
# health check.
# CLI flag: -querier.store-gateway-client.timeout
# CLI flag: -querier.store-gateway-client.healthcheck.timeout
[timeout: <duration> | default = 1s]

# If enabled, store gateway query stats will be logged using `info` log level.
Expand Down
12 changes: 6 additions & 6 deletions docs/configuration/config-file-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -3256,17 +3256,17 @@ grpc_client_config:
healthcheck_config:
# The number of consecutive failed health checks required before considering
# a target unhealthy. 0 means disabled.
# CLI flag: -ingester.client.unhealthy-threshold
# CLI flag: -ingester.client.healthcheck.unhealthy-threshold
[unhealthy_threshold: <int> | default = 0]
# The approximate amount of time between health checks of an individual
# target.
# CLI flag: -ingester.client.interval
# CLI flag: -ingester.client.healthcheck.interval
[interval: <duration> | default = 5s]
# The amount of time during which no response from a target means a failed
# health check.
# CLI flag: -ingester.client.timeout
# CLI flag: -ingester.client.healthcheck.timeout
[timeout: <duration> | default = 1s]
# Max inflight push requests that this ingester client can handle. This limit is
Expand Down Expand Up @@ -4004,17 +4004,17 @@ store_gateway_client:
healthcheck_config:
# The number of consecutive failed health checks required before considering
# a target unhealthy. 0 means disabled.
# CLI flag: -querier.store-gateway-client.unhealthy-threshold
# CLI flag: -querier.store-gateway-client.healthcheck.unhealthy-threshold
[unhealthy_threshold: <int> | default = 0]
# The approximate amount of time between health checks of an individual
# target.
# CLI flag: -querier.store-gateway-client.interval
# CLI flag: -querier.store-gateway-client.healthcheck.interval
[interval: <duration> | default = 5s]
# The amount of time during which no response from a target means a failed
# health check.
# CLI flag: -querier.store-gateway-client.timeout
# CLI flag: -querier.store-gateway-client.healthcheck.timeout
[timeout: <duration> | default = 1s]
# If enabled, store gateway query stats will be logged using `info` log level.
Expand Down
6 changes: 3 additions & 3 deletions pkg/util/grpcclient/health_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ type HealthCheckConfig struct {

// RegisterFlagsWithPrefix for Config.
func (cfg *HealthCheckConfig) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet) {
f.Int64Var(&cfg.UnhealthyThreshold, prefix+".unhealthy-threshold", 0, "The number of consecutive failed health checks required before considering a target unhealthy. 0 means disabled.")
f.DurationVar(&cfg.Timeout, prefix+".timeout", 1*time.Second, "The amount of time during which no response from a target means a failed health check.")
f.DurationVar(&cfg.Interval, prefix+".interval", 5*time.Second, "The approximate amount of time between health checks of an individual target.")
f.Int64Var(&cfg.UnhealthyThreshold, prefix+".healthcheck.unhealthy-threshold", 0, "The number of consecutive failed health checks required before considering a target unhealthy. 0 means disabled.")
f.DurationVar(&cfg.Timeout, prefix+".healthcheck.timeout", 1*time.Second, "The amount of time during which no response from a target means a failed health check.")
f.DurationVar(&cfg.Interval, prefix+".healthcheck.interval", 5*time.Second, "The approximate amount of time between health checks of an individual target.")
}

type healthCheckClient struct {
Expand Down

0 comments on commit 8d79acc

Please sign in to comment.