-
Notifications
You must be signed in to change notification settings - Fork 38
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
Support for changing the cluster
Label on Dashboards
#3131
Comments
hi @Daniel-Vaz what if we added a command line argument to You would run something like
would be rewritten to the following, if you specified the argument
Would that work for you? |
Yes that was exactly what I was envisioning 😄 |
@Daniel-Vaz Yes, we can add this. Can you share your Prometheus relabel config so we can test the customized dashboards? |
In our setup we scrape Harvest using the "Prometheus Operator"-managed
The
If using the regular Prometheus config file make sure to change the configuration keys to the appropriate names ( |
hi @Daniel-Vaz these changes are in the nightly build. Please let use know how they work for you.
|
This is the config I used for local Prometheus testing - job_name: 'harvest-no-cluster'
metric_relabel_configs:
- source_labels: [cluster]
target_label: 'netapp_cluster'
- regex: cluster
action: labeldrop
static_configs:
- targets:
- 'localhost:17001' |
Verified in bin/harvest grafana customize --output-dir /tmp/dash2 --cluster-label foople --directory grafana/dashboards/cmode
rg -vF 'source_cluster=~' /tmp/dash2 | rg -F 'cluster=~'
(no hits) |
Feature Request: Customizable Cluster Label Name in Exported Metrics
Is your feature request related to a problem? Please describe.
Currently, Harvest uses the
cluster
label on most of its metrics to reference an ONTAP cluster. In Grafana dashboards, thiscluster
label is utilized by the$Cluster
variable to control various aspects of the panels.However, the
cluster
label is commonly used by other exporters and Prometheus stack implementations. This overlap leads to conflicts, resulting in broken Grafana dashboards.For example, when using a Prometheus stack hosted in Kubernetes to scrape and work with Harvest-exposed metrics, the
cluster
label is typically reserved as a Kubernetes cluster Prometheus external label to correctly identify the origin Kubernetes cluster. This practice is essential for maintaining large-scale, multi-tenant Prometheus setups.Describe the solution you'd like
It would be beneficial to have the ability to customize the label name for the existing
cluster
label in the exported metrics.Describe alternatives you've considered
For metrics ingestion, we can control the relabeling of the
cluster
label. However, for dashboards, the only workaround I've found so far is to manually edit all panels across all dashboards to change the$Cluster
variable to something else, like$netapp_cluster
.The text was updated successfully, but these errors were encountered: