finally running Harvest2 in a Docker environment with Prometheus and Grafana.
Problem is, there´s also other systems reporting in that same Prometheus DB and NetApp Harvest does not add a prefix on it´s metric names like netapp_ to every netapp metric. It is such a pain in the ass finding the correct metrics this way.
I would like to use the relable_config option of Prometheus_config as a workaround. At the moment i have the following configuration for the harvest pollers:
- job_name: harvest
scrape_interval: 1m
scrape_timeout: 1m
metrics_path: /metrics
relabel_configs:
- action: replace
source_labels: [__name__]
regex: (.*)
target_label: __name__
replacement: 'netapp_$1'
- action: keep
source_labels:
- "custom_labels"
- "custom_labels"
- "custom_labels"
- "custom_labels"
regex: '.+;.+;.+;.+'
file_sd_configs:
- refresh_interval: 10s
files:
- targets/harvest.yml
But this leads to the harvest pollers not showing up in Grafana/Prometheus at all. Any idea on how to add the required prefix?