On 17/02/2023 22:02, Jihui Yang wrote:
I'm using prometheus-operator's addionalScrapeConfigs <https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/additional-scrape-config.md> to add metric drop rules. Example:

```
- job_name: drop_response_metrics
  honor_timestamps: true
  scrape_interval: 30s
  scrape_timeout: 10s
  metrics_path: /metrics
  scheme: http
  follow_redirects: true
  metric_relabel_configs:
  - source_labels: [__name__]
    separator: ;
    regex: (response_total|response_latency_ms_count|response_latency_ms_sum)
    replacement: $1
    action: drop
```

The config is successfully loaded to prometheus and I can view it in `/config` endpoint. But for some reason I still can see the metrics. can you let me know what to do?

Is that the full config? I'm not seeing a Service Discovery section (e.g. Kubernetes or file based) to tell Prometheus where to scrape from.

--
Stuart Clark

--
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 prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/797c0c2e-d0d2-8b1a-2067-305307d6ed2e%40Jahingo.com.

Reply via email to