Add Prometheus and Alertmanager configurations: implement custom rules, alerting, and Telegram notifications
This commit is contained in:
@@ -192,6 +192,21 @@ locals {
|
||||
}
|
||||
}
|
||||
|
||||
# prometheus
|
||||
prometheus_config = file("${path.module}/resources/prometheus.yml")
|
||||
prometheus_rules = file("${path.module}/resources/prometheus-rules.yml")
|
||||
alertmanager_config = file("${path.module}/resources/alertmanager.yml")
|
||||
alertmanager_email_config = {
|
||||
to = "c.alexandre.pires@alexpires.me"
|
||||
from = "alertmanager@${local.primary_domain}"
|
||||
smarthost = "smtp.tem.scw.cloud:587"
|
||||
auth_username = var.scaleway_project_id
|
||||
auth_password = local.mail_app_api_secret_key
|
||||
}
|
||||
|
||||
telegram_chat_id = "5432313610" # a13labs channel
|
||||
telegram_message = file("${path.module}/resources/telegram.tpl")
|
||||
|
||||
# get secrets from remote state
|
||||
backup_bucket_name = data.terraform_remote_state.scaleway.outputs.backup_bucket_name
|
||||
backup_app_api_secret_key = data.terraform_remote_state.scaleway.outputs.backup_app_api_secret_key
|
||||
|
||||
Reference in New Issue
Block a user