Add option to stop reporting deleted resources in Prometheus scrape endpoint
See original GitHub issueProposal
Add a setting to stop reporting deleted resources in Prometheus scrape endpoint.
From https://docs.promitor.io/faq#how-does-promitor-handle-deleted-resources
Removed resources will immediately stop being scraped by Promitor, but still be reported in Prometheus scrape endpoint.
Reporting metrics for deleted resources:
- can be misleading to those viewing the metrics (e.g. this is not standard behaviour for most exporters)
- leads to false-positive alerts with
promitor_scrape_errormetric, as the metric returns1for any deleted resources - unnecessarily stores additional time-series in Prometheus
An option to stop reporting metrics for deleted resources would resolve the above issues.
Component
Scraper
Contact Details
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Configuration | Prometheus
A scrape_config section specifies a set of targets and parameters describing how to scrape them. In the general case, one scrape configuration specifies...
Read more >prometheus.scrape | Grafana Agent documentation
prometheus.scrape reports the status of the last scrape for each configured scrape job on the component's debug endpoint. Debug metrics.
Read more >Scraping additional Prometheus sources and importing those ...
Tutorial for adding a new Prometheus scrape target: Prometheus API Server metrics. The Kubernetes API Server exposes Prometheus metrics on endpoints by default....
Read more >Prometheus Operator
To remove the operator and Prometheus, first delete any custom resources you created in each namespace. The operator will automatically shut down and...
Read more >Kubernetes Monitoring with Prometheus, Ultimate Guide
Prometheus monitoring is fast becoming the Docker and Kubernetes monitoring tool to use. Learn to implement Kubernetes monitoring with Prometheus.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

This is coming as per https://github.com/prom-client-net/prom-client/discussions/177 and https://github.com/prom-client-net/prom-client/issues/178 so then we can do a more proper clean-up.
However, we would need to check if this is an opt-in or not given others who use timestamps might want to keep them around.
Yup