-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding initial examples for alertmananger
Parking intial slack and encore configuration examples for alertmanager
- Loading branch information
Showing
2 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
|
||
The following example describes configuration options to send alerts via alertmanager to | ||
Rackspace encore, the `Encore UUID` is derived by account where the secret `SECRET KEY` is | ||
used per application submitting webhooks: | ||
|
||
```yaml | ||
global: | ||
resolve_timeout: 5m | ||
receivers: | ||
- name: default-receiver | ||
- name: watchman-webhook | ||
- name: critical-alert-manager-handler | ||
webhook_configs: | ||
- url: https://watchman.api.manage.rackspace.com/v1/mpk:<ENCORE UUID>/webhook/mpk-alertmanager?secret=<SECRET KEY>&severity=high | ||
- url: http://prometheus-msteams.rackspace-system.svc:2000/critical | ||
- name: warning-alert-manager-handler | ||
webhook_configs: | ||
- url: http://prometheus-msteams.rackspace-system.svc:2000/warning | ||
route: | ||
group_by: | ||
- alertname | ||
- severity | ||
- cluster | ||
- region | ||
group_wait: 10s | ||
group_interval: 5m | ||
repeat_interval: 12h | ||
receiver: watchman-webhook | ||
routes: | ||
- match: | ||
severity: critical | ||
receiver: watchman-webhook | ||
routes: | ||
- match_re: | ||
namespace: kube-system|rackspace-system | ||
receiver: critical-alert-manager-handler | ||
#- match_re: | ||
# severity: warning | ||
# receiver: watchman-webhook | ||
# routes: | ||
# - match_re: | ||
# namespace: kube-system|rackspace-system | ||
# receiver: warning-alert-manager-handler | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
|
||
The following example describes configuration options to send alerts via alertmanager to slack | ||
using a slack hook. | ||
|
||
```yaml | ||
alertmanager: | ||
alertmanagerSpec: | ||
image: | ||
repository: docker.io/prom/alertmanager:v0.20.0 | ||
config: | ||
global: | ||
resolve_timeout: 5m | ||
receivers: | ||
- name: default-receiver | ||
- name: watchman-webhook | ||
- name: warning-alert-manager-handler | ||
slack_configs: | ||
- api_url: https://hooks.slack.com/services/<slackwebhookhere> | ||
channel: '#<slack-channel here>' | ||
send_resolved: true | ||
text: >- | ||
{{- if .CommonAnnotations.summary -}} | ||
*Summary*: {{- .CommonAnnotations.summary -}}{{- "\n" -}} | ||
{{- else if .CommonAnnotations.description -}} | ||
*Description*: {{- .CommonAnnotations.description -}}{{- "\n" -}} | ||
{{- else if .CommonAnnotations.message -}} | ||
*Message*: {{- .CommonAnnotations.message -}}{{- "\n" -}} | ||
{{- end -}} | ||
*Cluster*: {{ .GroupLabels.cluster }} | ||
*Wiki*: https://desired.wiki.page/{{ .GroupLabels.alertname }} | ||
route: | ||
group_by: | ||
- alertname | ||
- severity | ||
- cluster | ||
- region | ||
group_interval: 5m | ||
group_wait: 10s | ||
receiver: watchman-webhook | ||
repeat_interval: 12h | ||
routes: | ||
- match_re: | ||
severity: critical | ||
receiver: warning-alert-manager-handler | ||
``` |