- job_name: 'abc'
metrics_path: /prometheus
scheme: https
static_configs:
- targets: ['test_vm']
tls_config:
insecure_skip_verify: true
metric_relabel_configs:
- source_labels: [__name__]
regex: "jvm_memory_used_bytes"
action: keep
I am trying to keep only "jvm_memory_used_bytes" metric using metric_relabel_configs but on the dashboard I am able to see all the metrics. I also changed 'action' to 'drop' but "jvm_memory_used_bytes" is not getting dropped.
Is the above configuration correct ? Is there a way to filter the metrics at the source, so that while using the curl command for metric endpoint we will be able to see only the required metrics.