diff --git a/alert-manager.yml b/alert-manager.yml new file mode 100644 index 0000000000..e0204b0579 --- /dev/null +++ b/alert-manager.yml @@ -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: \ No newline at end of file diff --git a/alertmanager/README.md b/alertmanager/README.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/alertmanager/alertmanager.yml b/alertmanager/alertmanager.yml new file mode 100644 index 0000000000..ff88e3a552 --- /dev/null +++ b/alertmanager/alertmanager.yml @@ -0,0 +1,17 @@ +# global: +# resolve_timeout: 5m + +# route: +# 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 }}' diff --git a/prometheus/alert_rules.yml b/prometheus/alert_rules.yml new file mode 100644 index 0000000000..e2ae10fab1 --- /dev/null +++ b/prometheus/alert_rules.yml @@ -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." diff --git a/prometheus/prometheus.yml b/prometheus/prometheus.yml index 368ff2a06c..d258c9cc5a 100644 --- a/prometheus/prometheus.yml +++ b/prometheus/prometheus.yml @@ -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" \ No newline at end of file