From c3e55fb262ccaa235adabdb51851ef8681f116b1 Mon Sep 17 00:00:00 2001 From: Rodrigue Koffi Date: Mon, 29 Aug 2022 18:55:55 +0200 Subject: [PATCH] Merge alerts and rules in two separate rules --- modules/workloads/infra/alerts.tf | 151 +----------------------------- modules/workloads/infra/main.tf | 2 +- modules/workloads/infra/rules.tf | 98 +------------------ 3 files changed, 4 insertions(+), 247 deletions(-) diff --git a/modules/workloads/infra/alerts.tf b/modules/workloads/infra/alerts.tf index 78ed8c8..7c3dc0d 100644 --- a/modules/workloads/infra/alerts.tf +++ b/modules/workloads/infra/alerts.tf @@ -2,7 +2,7 @@ # Alerting rules ############################################################################################################################### ################################################################################################################################################ -resource "aws_prometheus_rule_group_namespace" "nodenw" { +resource "aws_prometheus_rule_group_namespace" "alerting_rules" { count = var.enable_alerting_rules ? 1 : 0 name = "nodenw-rules" @@ -19,18 +19,6 @@ groups: annotations: description: Network interface "{{ $labels.device }}" changing its up status often on node-exporter {{ $labels.namespace }}/{{ $labels.pod }} summary: Network interface is often changing its status -EOF -} - - - -resource "aws_prometheus_rule_group_namespace" "nodeexporter" { - count = var.enable_alerting_rules ? 1 : 0 - - name = "nodeexporter-rules" - workspace_id = var.managed_prometheus_workspace_id - data = <