mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
documentation/prometheus-mixin: improve PrometheusNotIngestingSamples
The alert shouldn't fire when there's no target and no rule configured. Signed-off-by: Simon Pasquier <spasquie@redhat.com>
This commit is contained in:
parent
73e2ce1bd6
commit
f381d8a9bd
|
@ -127,7 +127,15 @@
|
||||||
{
|
{
|
||||||
alert: 'PrometheusNotIngestingSamples',
|
alert: 'PrometheusNotIngestingSamples',
|
||||||
expr: |||
|
expr: |||
|
||||||
rate(prometheus_tsdb_head_samples_appended_total{%(prometheusSelector)s}[5m]) <= 0
|
(
|
||||||
|
rate(prometheus_tsdb_head_samples_appended_total{%(prometheusSelector)s}[5m]) <= 0
|
||||||
|
and
|
||||||
|
(
|
||||||
|
sum without(scrape_job) (prometheus_target_metadata_cache_entries{%(prometheusSelector)s}) > 0
|
||||||
|
or
|
||||||
|
sum without(rule_group) (prometheus_rule_group_rules{%(prometheusSelector)s}) > 0
|
||||||
|
)
|
||||||
|
)
|
||||||
||| % $._config,
|
||| % $._config,
|
||||||
'for': '10m',
|
'for': '10m',
|
||||||
labels: {
|
labels: {
|
||||||
|
|
Loading…
Reference in a new issue