Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
Tags
- AWS
- EC2
- Query
- 리눅스
- 센토스
- x-forward-for
- Windows
- ubuntu
- xen
- resize2fs
- centos
- ntp
- port
- mysql
- DELETE
- nvme
- VPN
- awscli
- EBS
- RDS
- x-real-ip
- Error
- 아마존
- onpromise
- deragistration
- DISK
- Linux
- 인스턴스타입
- fdisk
- terraform
Archives
- Today
- Total
Cloud
프로메테우스 모니터링 알림 라우트 설정 본문
일단 계속 업데이트 할 예정입니다. 완료해서 포스팅 하려니까 자꾸 안하게 되어서요.
alert.rule 업데이트 하고 amtool 로 문법체크 하여 줍니다.
더 해야될 것은 채널에 이름나올떄 alertmanager 가 아니라 각 채널의 이름이 나오는 것과, Annotations.description 을 못가지고 오는 것 같은데, 왜 그런지 확인 하는 부분이 남아있습니다. ( {{ $labels.name }} 으로 가져오면 됩니다.)
global:
resolve_timeout: 5m
slack_api_url: "https://hooks.slack.com/services/ap1" # global Slack API URL
route:
group_by: ['alertname']
group_wait: 30s
group_interval: 5m
repeat_interval: 24h
receiver: 'default-receiver'
routes:
- matchers:
- job_name =~ "ap1"
receiver: 'ap1'
- matchers:
- job_name =~ "ap2"
receiver: 'ap2'
- matchers:
- job_name =~ "ap3"
receiver: 'ap3'
receivers:
- name: 'default-receiver'
slack_configs:
- api_url: "https://hooks.slack.com/services/ap1"
username: 'ap1'
send_resolved: true
channel: '#ap1'
title: "{{ range .Alerts }}{{ .Annotations.summary }}\n{{ end }}"
text: "{{ range .Alerts }}{{ .Annotations.description }}\n{{ end }}"
icon_emoji: ':bell:'
- name: 'ap2'
slack_configs:
- api_url: "https://hooks.slack.com/services/ap2"
username: 'ap2'
send_resolved: true
channel: '#ap2'
title: "{{ range .Alerts }}{{ .Annotations.summary }}\n{{ end }}"
text: "{{ range .Alerts }}{{ .Annotations.description }}\n{{ end }}"
icon_emoji: ':dart:'
- name: 'ap3'
slack_configs:
- api_url: "https://hooks.slack.com/services/ap3"
username: 'ap3'
send_resolved: true
channel: '#ap3'
title: "{{ range .Alerts }}{{ .Annotations.summary }}\n{{ end }}"
text: "{{ range .Alerts }}{{ .Annotations.description }}\n{{ end }}"
icon_emoji: ':dart:'
- name: 'ap4'
slack_configs:
- api_url: "https://hooks.slack.com/services/ap4"
channel: '#ap4'
title: "{{ range .Alerts }}{{ .Annotations.summary }}\n{{ end }}"
text: "{{ range .Alerts }}{{ .Annotations.description }}\n{{ end }}"
icon_emoji: ':bell:'
templates:
- /opt/prometheus/alertmanager/notifications.tmpl
Comments