How do you limit the damage one bad target can do to Prometheus?
AdvancedConceptPrometheus Architecture
Answer
Per-scrape-config limits:
- job_name: apps
sample_limit: 50000
label_limit: 30
label_name_length_limit: 128
label_value_length_limit: 512
target_limit: 500
body_size_limit: 20MB
If a scrape exceeds sample_limit, the whole scrape fails and up becomes 0, which is visible and alertable, instead of silently adding a million series. Watch prometheus_target_scrapes_exceeded_sample_limit_total.
More on Prometheus Architecture
Describe the Prometheus architecture.BeginnerWhat does a basic prometheus.yml look like?BeginnerWhat is the `up` metric?BeginnerWhat are `job` and `instance` labels and where do they come from?BeginnerHow is the Prometheus TSDB organized on disk?AdvancedWhat is the WAL and why does Prometheus restart slowly sometimes?Advanced