Skip to content

Commit

Permalink
README: update label doc
Browse files Browse the repository at this point in the history
  • Loading branch information
talal committed Aug 17, 2020
1 parent 8839ad8 commit c1ac871
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
- [Absent metric alert definition](#absent-metric-alert-definition)
- [Template](#template)
- [Labels](#labels)
- [Caveat](#caveat)
- [Default tier and service](#default-tier-and-service)

The absent metrics operator is a companion operator for the [Prometheus
Operator](https://github.com/prometheus-operator/prometheus-operator).
Expand Down Expand Up @@ -196,25 +196,16 @@ Then the alert name would be `AbsentOsLimesSuccessfulScrapesRate5m`.

### Labels

**Note**: There should be at least one alert rule for a specific Prometheus
server in a namespace that has the `tier` and `service` label defined without
templating, i.e. does not use `$labels`. See caveat below.

- `tier` and `service` labels are carried over from the original alert rule
unless the alert rule uses templating for these labels, in which case the
unless those labels use templating (i.e. use `$labels`), in which case the
default `tier` and `service` values for that Prometheus server in that
namespace will be used.
- `severity` is always `info`.

#### Caveat
#### Default tier and service

The operator determines a default `tier` and `service` for a specific
Prometheus server in a namespace by traversing through all the alert rule
definitions for that Prometheus server in that namespace. It chooses the most
common `tier` and `service` label combination that is used across these alerts
common `tier` and `service` label combination that is used across those alerts
as the default values.

It is important that the operator finds a default `tier` and `service`
otherwise the operator will print an error and it will not create absent alert
rules for that specific `PrometheusRule`. It will instead requeue that resource
for later processing.

0 comments on commit c1ac871

Please sign in to comment.