I'm using file_sd_configs  and I need to drop/filter out a metric that has 
a specific label.

I have tried this but it drops all the metrics

scrape_configs:
  - job_name: 'dummy'  # This is a default value, it is mandatory.
    file_sd_configs:
      - files:
        - /opt/prometheus/targets/*.core.json
        refresh_interval: 5m
    metric_relabel_configs:
      - source_labels: [ __name__]
        regex: 'node_systemd_unit_state'
        action: drop

But I want to just drop metrics for node_systemd_unit_state that have the 
label 'name' match some specific patterns.   name=~"*(pattern1|pattern2)*"

I know I could modify the node_exporter config to drop specific services 
but I don't have the ability to do that to all endpoints so I'd like to 
drop them at the scrape level. 

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/19f0aa34-3c13-480b-abb2-3ec833c683adn%40googlegroups.com.

Reply via email to