Add Prometheus and Alertmanager configurations: implement custom rules, alerting, and Telegram notifications
This commit is contained in:
@@ -167,16 +167,22 @@ locals {
|
||||
backup_app_api_access_key = data.terraform_remote_state.scaleway.outputs.backup_app_api_access_key
|
||||
mail_app_api_secret_key = data.terraform_remote_state.scaleway.outputs.mail_app_api_secret_key
|
||||
|
||||
grafana_fqdn = "grafana.${local.lab_domain}"
|
||||
|
||||
remote_targets = {
|
||||
"prometheus" = {
|
||||
listen_port = 9090
|
||||
target_host = "10.5.5.5"
|
||||
target_port = 9090
|
||||
protocol = "TCP"
|
||||
}
|
||||
# prometheus and grafana
|
||||
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.lab_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")
|
||||
|
||||
grafana_fqdn = "grafana.${local.lab_domain}"
|
||||
}
|
||||
|
||||
data "terraform_remote_state" "scaleway" {
|
||||
|
||||
Reference in New Issue
Block a user