remove prometheus alertmanager

grafana has basic alert mechanisms included, might be enough for most
usecases?
This commit is contained in:
Philipp Rothmann 2023-06-01 15:10:53 +02:00
parent 8c82943289
commit de1819521b
4 changed files with 2 additions and 51 deletions

View File

@ -13,12 +13,8 @@ TIMEOUT=120
# Monitoring Server
#
## Prometheus, Alertmanager
## Prometheus
# COMPOSE_FILE="$COMPOSE_FILE:compose.prometheus.yml"
# ALERTMANAGER_SMTP_FROM=noreply@autonomic.zone
# ALERTMANAGER_SMTP_HOST=mail.gandi.net:587
# ALERTMANAGER_SMTP_TO=kaboom@autonomic.zone
# SECRET_ALERTMANAGER_SMTP_PASSWORD_VERSION=v1
# PROMETHEUS_RETENTION_TIME=1y
## Loki
# Loki Server

View File

@ -8,7 +8,6 @@ export GRAFANA_CUSTOM_INI_VERSION=v2
export PROMTAIL_YML_VERSION=v1
export LOKI_YML_VERSION=v1
export PROMETHEUS_YML_VERSION=v1
export ALERTMANAGER_CONFIG_VERSION=v1
# creates a default prometheus scrape config for a given node
add_node(){

View File

@ -1,13 +0,0 @@
global:
smtp_from: {{ env "ALERTMANAGER_SMTP_FROM" }}
smtp_smarthost: {{ env "ALERTMANAGER_SMTP_HOST" }}
smtp_auth_username: {{ env "ALERTMANAGER_SMTP_FROM" }}
smtp_auth_password: {{ secret "alertmanager_smtp_password" }}
route:
receiver: "kaboom-mailer"
receivers:
- name: "kaboom-mailer"
email_configs:
- to: {{ env "ALERTMANAGER_SMTP_TO" }}

View File

@ -31,42 +31,11 @@ services:
- "traefik.http.routers.${STACK_NAME}-prometheus.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.http.routers.${STACK_NAME}-prometheus.middlewares=basicauth@file"
alertmanager:
image: prom/alertmanager:v0.25.0
volumes:
- alertmanager-data:/etc/alertmanager
command:
- "--config.file=/etc/alertmanager/config.yml"
- "--storage.path=/alertmanager"
networks:
- internal
secrets:
- alertmanager_smtp_password
configs:
- source: alertmanager_config
target: /etc/alertmanager/config.yml
environment:
- ALERTMANAGER_SMTP_FROM
- ALERTMANAGER_SMTP_HOST
- ALERTMANAGER_SMTP_TO
configs:
prometheus_yml:
template_driver: golang
name: ${STACK_NAME}_prometheus_yml_${PROMETHEUS_YML_VERSION}
file: prometheus.yml.tmpl
alertmanager_config:
template_driver: golang
name: ${STACK_NAME}_alertmanager_config_${ALERTMANAGER_CONFIG_VERSION}
file: ./alertmanager.yml.tmpl
volumes:
prometheus-data:
alertmanager-data:
secrets:
alertmanager_smtp_password:
external: true
name: ${STACK_NAME}_alertmanager_smtp_password_${SECRET_ALERTMANAGER_SMTP_PASSWORD_VERSION}
prometheus-data: