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

[collector] Allow adding extra labels to Prometheus alerts #1413

Open
wrdls opened this issue Nov 13, 2024 · 1 comment
Open

[collector] Allow adding extra labels to Prometheus alerts #1413

wrdls opened this issue Nov 13, 2024 · 1 comment
Labels
chart:collector Issue related to opentelemetry-collector helm chart

Comments

@wrdls
Copy link

wrdls commented Nov 13, 2024

In our company we need to add something like a team or domain label to our alerts to route them to the correct owner.

https://github.com/open-telemetry/opentelemetry-helm-charts/blob/main/charts/opentelemetry-collector/templates/prometheusrule.yaml#L23-L24

E.g. the above would need to become something like this for us.

      labels:
        severity: critical
        team: sre

Helm templating wise this would be very similar as this https://github.com/open-telemetry/opentelemetry-helm-charts/blob/main/charts/opentelemetry-collector/templates/prometheusrule.yaml#L9-L11

I'm willing to contribute if you think this would be a good thing to have.

@TylerHelmuth TylerHelmuth added chart:operator Issue related to opentelemetry-operator helm chart chart:collector Issue related to opentelemetry-collector helm chart and removed chart:operator Issue related to opentelemetry-operator helm chart labels Nov 13, 2024
@TylerHelmuth
Copy link
Member

Adding something to prometheusRule.defaultRules to add labels to every default rule seem ok, but if you need specific labels for specific rules you should use prometheusRule.groups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chart:collector Issue related to opentelemetry-collector helm chart
Projects
None yet
Development

No branches or pull requests

2 participants