Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding initial examples for alertmananger #139

Merged
merged 1 commit into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions docs/examples/alertmanager-encore.md
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
```
45 changes: 45 additions & 0 deletions docs/examples/alertmanager-slack.md
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
```
Loading