Skip to content

Commit

Permalink
feat : Alert Manager start
Browse files Browse the repository at this point in the history
  • Loading branch information
annadiplacido committed Oct 14, 2024
1 parent 636a887 commit 2bf9fb5
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 15 deletions.
18 changes: 10 additions & 8 deletions cloud/config/alertmanager/alertmanager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@ global:

route:
group_by: ['alertname']
group_wait: 30s
group_interval: 5m
repeat_interval: 3h
group_wait: 10s
group_interval: 1m
repeat_interval: 3s
receiver: 'email_notifications'

receivers:
- name: 'email_notifications'
email_configs:
- to: '[email protected]'
from: '[email protected]'
smarthost: 'smtp.example.com:587'
auth_username: 'username'
auth_password: 'password'
- to: '{{ env "SMTP_USERNAME_TO" }}'
from: '{{ env "SMTP_USERNAME_FROM" }}'
smarthost: 'smtp.gmail.com:587'
auth_username: '{{ env "SMTP_USERNAME" }}'
auth_password: '{{ env "SMTP_PASSWORD" }}'
require_tls: true
service alertmanager restart
6 changes: 5 additions & 1 deletion cloud/config/grafana/.env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
CLIENT_ID=TODO
CLIENT_SECRET=TODO
CLIENT_SECRET=TODO
SMTP_USERNAME=TODO
SMTP_PASSWORD=TODO
SMTP_USERNAME_TO=TODO
SMTP_USERNAME_FROM=TODO
13 changes: 7 additions & 6 deletions cloud/config/read/prometheus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ global:
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
# scrape_timeout is set to the global default (10s).

# Alertmanager configuration
#alerting:
# alertmanagers:
# - static_configs:
# - targets:
# - alertmanager:9093
#Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets:
- alertmanager:9093

# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
- "health_alert.yml"
# - "first_rules.yml"
# - "second_rules.yml"

Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ services:
- ./cloud/config/alertmanager:/etc/alertmanager
command:
- --config.file=/etc/alertmanager/alertmanager.yml
env_file:
- ./cloud/config/.env
grafana:
image: grafana/grafana
ports:
Expand Down

0 comments on commit 2bf9fb5

Please sign in to comment.