Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

contour: parameterise envoy scraping interval #1229

Merged
merged 4 commits into from
Dec 4, 2020

Conversation

surajssd
Copy link
Member

@surajssd surajssd commented Dec 2, 2020

This commit adds a parameter to contour's component config, using which now users can choose what (prometheus) scrape interval they want for envoy.

How to use

Deploy contour using following config:

component "contour" {
  enable_monitoring = true

  envoy {
    metrics_scrape_interval = "30s"
  }
}

And you can watch the field interval vary according to the value of metrics_scrape_interval. If the field metrics_scrape_interval is not provided then the interval field is also left out.

kubectl -n projectcontour get servicemonitor envoy -o yaml | grep interval

Fixes: #1194

This commit adds a parameter `metrics_scrape_interval` using which user
can control the envoy's metrics scraping interval.

Signed-off-by: Suraj Deshmukh <[email protected]>
@surajssd surajssd requested review from invidian and knrt10 December 2, 2020 08:28
@surajssd surajssd changed the title parameterise envoy scraping interval contour: parameterise envoy scraping interval Dec 2, 2020
Copy link
Member

@invidian invidian left a comment

Choose a reason for hiding this comment

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

I still have a feeling that:

  • Increasing scrape interval might not be an optimal solution to solve the problem.
  • Such customization seems very specific to me and having large amount of such will make it hard to maintain. I think we have to invest time in making generic customization mechanism. But even then, we will have to deprecate and eventually remove almost all of already added ones.

It would be good if someone experienced with Envoy and Prometheus could have a look at it.

docs/configuration-reference/components/contour.md Outdated Show resolved Hide resolved
This test adds a test case to verify if the newly added parameter
`envoy.metrics_scrape_interval` correctly converts and becomes a part of
`ServiceMonitor` config.

Signed-off-by: Suraj Deshmukh <[email protected]>
@surajssd surajssd force-pushed the surajssd/parameterise-envoy-scraping branch from c0e4c62 to ee776a5 Compare December 2, 2020 09:06
@surajssd
Copy link
Member Author

surajssd commented Dec 2, 2020

@invidian

  • Increasing scrape interval might not be an optimal solution to solve the problem.

This PR does not change anything unless user does. Any why reducing scrape interval might not solve the problem?

  • Such customization seems very specific to me and having large amount of such will make it hard to maintain. I think we have to invest time in making generic customization mechanism. But even then, we will have to deprecate and eventually remove almost all of already added ones.

What are you suggesting we do in this particular case? I agree we need a generic customization mechanism.

It would be good if someone experienced with Envoy and Prometheus could have a look at it.

And who would that be?

@invidian
Copy link
Member

invidian commented Dec 2, 2020

This PR does not change anything unless user does. Any why reducing scrape interval might not solve the problem?

I'm not saying it won't solve the problem. I'm saying that it might not be the optimal solution. In #1194 (comment) I suggested testing with different bucket sizes for latency metrics. Or maybe some new metric should be added to Envoy to allow spotting those latency spikes more easily.

Increasing scrape interval seems more like a brute-force workaround to me, rather than a proper solution to the problem.

What are you suggesting we do in this particular case?

Merge if it's urgent enough, switch focus to generic customization mechanism if not urgent IMO.

@surajssd surajssd requested review from iaguis and johananl December 3, 2020 13:01
Copy link
Contributor

@iaguis iaguis left a comment

Choose a reason for hiding this comment

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

lgtm

@invidian invidian dismissed their stale review December 4, 2020 10:57

Dismissing myself.

@surajssd surajssd merged commit 9761c7c into master Dec 4, 2020
@surajssd surajssd deleted the surajssd/parameterise-envoy-scraping branch December 4, 2020 11:00
johananl added a commit that referenced this pull request Dec 4, 2020
The tests were broken in #1229.
@invidian invidian mentioned this pull request Dec 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configure a lower scrape interval for Project Contour Envoy service monitor
3 participants