Skip to content
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

disabled metrics based on label #707

Open
rismoney opened this issue Oct 10, 2024 · 4 comments
Open

disabled metrics based on label #707

rismoney opened this issue Oct 10, 2024 · 4 comments

Comments

@rismoney
Copy link

rismoney commented Oct 10, 2024

What feature do you want to see added?

Currently it seems as though you can only disable metrics by their name. I would like to disable metrics by a label match.
For instance in our environment I only am interested in master branch, so I would like to drop metrics, for instance that have jenkins_job="systems/terraform/PR.*"

I don't believe this would work using the regex capability today.
prometheus_jenkins_builds_stage_duration_milliseconds_summary_created(?!.master).

Currently I am dropping the metrics on relabel on the prometheus.yml side.

@Waschndolos
Copy link

We had this request a couple of times. I understand that this could be a useful feature but the labels are calculated when the metric is calculated.
Therefore there's not much benefit in terms of workload. It would just be a truncation of the output while the metric itself would still be calculated by Jenkins. There would be quite a litlle refactoring to archive this. I'll keep this ticket open - but do not expect immediate results (low on time right now)

@rismoney
Copy link
Author

Ah I somehow missed it in searching issues. No worries. Like I said I have managed to mitigate it via relabeling/drop before prometheus ingestion. Overall awesome work on the project - kudos to you and the contributors around.

Copy link

Stale issue message

@Waschndolos
Copy link

.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants