-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
sidecar: Add args prometheus.get_config_interval and prometheus.timeout_get_config #5573
Conversation
The config request is pretty lightweight to Prometheus I guess. Have you seen a performance issue on this? Or do you have any other use cases? |
Simular issue - #4121 In My installation Prometheus I have more then 1000 ServiceMonitors, and very big Prometheus installation (many shards). Sometimes prometheus answered on requests |
cmd/thanos/config.go
Outdated
cmd.Flag("prometheus.get_config_interval", | ||
"How often the Prometheus config"). | ||
Default("30s").DurationVar(&pc.getConfigInterval) | ||
cmd.Flag("prometheus.timeout_get_config", |
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.
rename it to prometheus.get_config_timeout
cmd/thanos/config.go
Outdated
"How often the Prometheus config"). | ||
Default("30s").DurationVar(&pc.getConfigInterval) | ||
cmd.Flag("prometheus.timeout_get_config", | ||
"Timeout for get Prometheus config"). |
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.
for getting
cmd/thanos/config.go
Outdated
@@ -75,6 +77,12 @@ func (pc *prometheusConfig) registerFlag(cmd extkingpin.FlagClause) *prometheusC | |||
cmd.Flag("prometheus.ready_timeout", | |||
"Maximum time to wait for the Prometheus instance to start up"). | |||
Default("10m").DurationVar(&pc.readyTimeout) | |||
cmd.Flag("prometheus.get_config_interval", | |||
"How often the Prometheus config"). |
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.
How often to get Prometheus config
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.
Also please add a changelog as well.
docs/components/sidecar.md
Outdated
@@ -136,6 +138,8 @@ Flags: | |||
--prometheus.ready_timeout=10m | |||
Maximum time to wait for the Prometheus | |||
instance to start up | |||
--prometheus.timeout_get_config=5s | |||
Timeout for get Prometheus config |
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.
Please regenerate the docs by make docs
.
@yeya24 Hi |
Please rebase main and update the change log then we can merge. Thanks! |
Signed-off-by: Zemtsov Vladimir <vl.zemtsov@gmail.com>
Done |
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.
LGTM
(1) is not always bad, we are trying hard (and it's a really hard problem) to not have many different options because then it becomes really confusing (: but if this solves a practical problem then it looks good! |
Signed-off-by: Zemtsov Vladimir <vl.zemtsov@gmail.com> Signed-off-by: Zemtsov Vladimir <vl.zemtsov@gmail.com> Signed-off-by: Prakul Jain <prakul.jain@udaan.com>
Signed-off-by: Zemtsov Vladimir <vl.zemtsov@gmail.com> Signed-off-by: Zemtsov Vladimir <vl.zemtsov@gmail.com> Signed-off-by: Prakul Jain <prakul.jain@udaan.com>
Introducing missing arguments for thanos config interval and timeout. thanos-io/thanos#5573
Introducing missing arguments for thanos config interval and timeout. thanos-io/thanos#5573
* add thanos config args Introducing missing arguments for thanos config interval and timeout. thanos-io/thanos#5573 Co-authored-by: Simon Pasquier <spasquie@redhat.com>
Signed-off-by: Zemtsov Vladimir vl.zemtsov@gmail.com
Changes
Add 2 args for Thanos sidecar:
prometheus.get_config_interval
- How often the Prometheus config. Default - 30sprometheus.timeout_get_config
-Timeout for get Prometheus config. Default - 5sAdd docs for this changes
This needed, bc: