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

feat(alert-manager): Prometheus Alert Manager added with the prometheus service #1886

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
11 changes: 11 additions & 0 deletions alert-manager.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
services:
alertmanager:
image: prom/alertmanager
container_name: alertmanager
ports:
- 9093:9093
restart: unless-stopped
volumes:
- ./alertmanager:/etc/alertmanager
networks:
meet.jitsi:
Empty file added alertmanager/README.md

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fill with info on how to run

Empty file.
17 changes: 17 additions & 0 deletions alertmanager/alertmanager.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# global:
# resolve_timeout: 5m

# route:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add the link to the doc about configuring for slack

# receiver: 'slack-notifications'
# group_wait: 10s
# group_interval: 10s
# repeat_interval: 1h

receivers:
- name: 'slack-notifications'
slack_configs:
- api_url: URL_Slack_app
channel: '#alerts'
send_resolved: true
title: '{{ .CommonAnnotations.summary }}'
text: '{{ .CommonAnnotations.description }}'
11 changes: 11 additions & 0 deletions prometheus/alert_rules.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
groups:
- name: example
rules:
- alert: HighCPUUsage
expr: container_cpu_utilization_ratio > 0.05
for: 5s
labels:
severity: critical
annotations:
summary: "High CPU usage detected"
description: "CPU usage is above 5% for more than 10 seconds."
9 changes: 9 additions & 0 deletions prometheus/prometheus.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
alerting:
alertmanagers:
- static_configs:
- targets:
- 'alertmanager:9093'

scrape_configs:
- job_name: "prometheus"
scrape_interval: 5s
static_configs:
- targets: ["prosody:5280","jvb:8080","jicofo:8888","otel:9464"]

rule_files:
- "alert_rules.yml"
Loading