-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add configuration for Prometheus to limit cardinality #1887
Add configuration for Prometheus to limit cardinality #1887
Conversation
web_ui/prometheus.go
Outdated
@@ -396,6 +403,13 @@ func ConfigureEmbeddedPrometheus(ctx context.Context, engine *gin.Engine) error | |||
}}, | |||
}, | |||
} | |||
|
|||
// Cardinality limits for Prometheus, configured via Pelican configuration file | |||
scrapeConfig.LabelLimit = uint(param.Monitoring_LabelLimit.GetInt()) |
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.
I haven't spent much time with this code in general. Why does it become necessary to set these scrape limits in three different places?
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.
I had a hard time wrapping my head around it as well, but I figured if we set it to often it too often it wouldn't be an issue.
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.
One small touchup, and then I think we're good to go (pending some failing tests).
This PR addresses issue #1311. This PR uses the default values as described in this design doc. This PR adds the ability to configure the label name and value length limits, the number of labels per time series, and the scrape limit. More information about these parameters can be found here