Skip to content

Commit

Permalink
docs: _examples
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Mar 7, 2018
1 parent d9fe038 commit 6f6ad48
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 25 deletions.
26 changes: 1 addition & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,31 +39,7 @@ On the prometheus settings, add the domain_expoter prober:
It works more or less like prometheus's
[blackbox_exporter](https://github.com/prometheus/blackbox_exporter).

Alerting rules example:

```rules
ALERT DomainExpiring
IF domain_expiry_days < 30
FOR 1h
LABELS {
severity = "warning",
}
ANNOTATIONS {
description = "Domain {{ $labels.domain }} will expire in less than 30 days",
summary = "{{ $labels.domain }}: domain is expiring",
}
ALERT DomainExpiring
IF domain_expiry_days < 5
FOR 1h
LABELS {
severity = "page",
}
ANNOTATIONS {
description = "Domain {{ $labels.domain }} will expire in less than 5 days",
summary = "{{ $labels.domain }}: domain is expiring",
}
```
Alerting rules examples can be found on the [_examples]() folder.

## Building locally

Expand Down
21 changes: 21 additions & 0 deletions _examples/alerts.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
ALERT DomainExpiring
IF domain_expiry_days < 30
FOR 1h
LABELS {
severity = "warning",
}
ANNOTATIONS {
description = "Domain {{ $labels.domain }} will expire in less than 30 days",
summary = "{{ $labels.domain }}: domain is expiring",
}

ALERT DomainExpiring
IF domain_expiry_days < 5
FOR 1h
LABELS {
severity = "page",
}
ANNOTATIONS {
description = "Domain {{ $labels.domain }} will expire in less than 5 days",
summary = "{{ $labels.domain }}: domain is expiring",
}

0 comments on commit 6f6ad48

Please sign in to comment.