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

[prometheus-smartctl-exporter] Add ability to include extra labels on PrometheusRule's rules #4831

Open
achetronic opened this issue Sep 3, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@achetronic
Copy link
Contributor

Is your feature request related to a problem ?

When deploying this chart in several clusters, having a centralized metrics data lake, and a collector such as Grafana Agent for collecting and pushing the PrometheusRule objects to it, the problem is there is no way in your helm chart to modify the alerts

Describe the solution you'd like.

The idea is to include cluster-related information. It would be super useful to include some labels on the alerting rules for Alertmanager, and even include some extra metrics labels to filter the metrics by cluster

rules:
- alert: SmartCTLDeviceMediaErrors
  expr: smartctl_device_media_errors {my-custom-label="something", another="another-value"} != 0
  annotations:
    message: Device {{ $labels.device }} on instance {{ $labels.instance }} has media errors
  for: 1m
  labels:
    severity: error
    some-label: value
    cluster-name: this-is-a-cluster

Describe alternatives you've considered.

Template and modify directly the PrometheusRule included in your chart and deploy it separatedly, which is not clean enough :)

Additional context.

No response

@achetronic achetronic added the enhancement New feature or request label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant