From 278cc4aadd61a4d1b3edbc854dca13bf694dd184 Mon Sep 17 00:00:00 2001 From: Jonathan Funk Date: Mon, 28 Oct 2024 09:20:53 -0700 Subject: [PATCH] Uniqueify alert names --- .github/workflows/deploy-sysdig.yml | 2 +- terraform/alerts_prod.tf | 64 ++++++++++++++--------------- terraform/alerts_test.tf | 64 ++++++++++++++--------------- 3 files changed, 65 insertions(+), 65 deletions(-) diff --git a/.github/workflows/deploy-sysdig.yml b/.github/workflows/deploy-sysdig.yml index 9260e39e8..a1a4dae74 100644 --- a/.github/workflows/deploy-sysdig.yml +++ b/.github/workflows/deploy-sysdig.yml @@ -49,7 +49,7 @@ jobs: environment: tools name: Deploy Sysdig Terraform runs-on: ubuntu-22.04 - timeout-minutes: 3 + timeout-minutes: 10 steps: - uses: actions/checkout@v4 - name: Apply Sysdig Terraform diff --git a/terraform/alerts_prod.tf b/terraform/alerts_prod.tf index 4aed9642e..dda0f8560 100644 --- a/terraform/alerts_prod.tf +++ b/terraform/alerts_prod.tf @@ -1,6 +1,6 @@ ### Backend Alerts -resource "sysdig_monitor_alert_v2_prometheus" "backend_prod_cpu_quota" { - name = "Backend CPU Requests Quota Alert" +resource "sysdig_monitor_alert_v2_prometheus" "nr_backend_prod_cpu_quota" { + name = "Prod Backend CPU Requests Quota Alert" description = "Alert when the CPU requests usage is too high" severity = "medium" query = "sysdig_container_cpu_quota_used_percent{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-prod\",kube_deployment_name=\"nr-compliance-enforcement-prod-backend\",container_name=\"nr-compliance-enforcement-prod-backend\"} > 98" @@ -15,8 +15,8 @@ resource "sysdig_monitor_alert_v2_prometheus" "backend_prod_cpu_quota" { app = "NatCom" } } -resource "sysdig_monitor_alert_v2_prometheus" "backend_prod_mem_usage" { - name = "Backend Mem Usage Alert" +resource "sysdig_monitor_alert_v2_prometheus" "nr_backend_prod_mem_usage" { + name = "Prod Backend Mem Usage Alert" description = "Alert when the mem usage is too high" severity = "medium" query = "sysdig_container_memory_used_percent{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-prod\",kube_deployment_name=\"nr-compliance-enforcement-prod-backend\",container_name=\"nr-compliance-enforcement-prod-backend\"} > 98" @@ -31,8 +31,8 @@ resource "sysdig_monitor_alert_v2_prometheus" "backend_prod_mem_usage" { app = "NatCom" } } -resource "sysdig_monitor_alert_v2_prometheus" "backend_prod_mem_limit" { - name = "Backend Mem Limit Alert" +resource "sysdig_monitor_alert_v2_prometheus" "nr_backend_prod_mem_limit" { + name = "Prod Backend Mem Limit Alert" description = "Alert when the mem usage is near the limit for too long" severity = "high" query = "sysdig_container_memory_limit_used_percent{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-prod\",kube_deployment_name=\"nr-compliance-enforcement-prod-backend\",container_name=\"nr-compliance-enforcement-prod-backend\"} > 70" @@ -47,8 +47,8 @@ resource "sysdig_monitor_alert_v2_prometheus" "backend_prod_mem_limit" { app = "NatCom" } } -resource "sysdig_monitor_alert_v2_prometheus" "backend_prod_uptime_score" { - name = "Backend Uptime Alert" +resource "sysdig_monitor_alert_v2_prometheus" "nr_backend_prod_uptime_score" { + name = "Prod Backend Uptime Alert" description = "Alert when the backend container has too much downtime" severity = "high" query = "sysdig_container_up{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-prod\",kube_deployment_name=\"nr-compliance-enforcement-prod-backend\",container_name=\"nr-compliance-enforcement-prod-backend\"} < 0.7" @@ -63,8 +63,8 @@ resource "sysdig_monitor_alert_v2_prometheus" "backend_prod_uptime_score" { app = "NatCom" } } -resource "sysdig_monitor_alert_v2_prometheus" "backend_prod_http_silent" { - name = "Backend Unresponsive Alert" +resource "sysdig_monitor_alert_v2_prometheus" "nr_backend_prod_http_silent" { + name = "Prod Backend Unresponsive Alert" description = "Alert when the backend container has been unresponsive or silent for too long" severity = "high" query = "sysdig_container_net_http_request_count{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-prod\",kube_deployment_name=\"nr-compliance-enforcement-prod-backend\",container_name=\"nr-compliance-enforcement-prod-backend\"} < 0.1" @@ -80,8 +80,8 @@ resource "sysdig_monitor_alert_v2_prometheus" "backend_prod_http_silent" { } } ### Frontend Alerts -resource "sysdig_monitor_alert_v2_prometheus" "frontend_prod_cpu_quota" { - name = "Frontend CPU Requests Quota Alert" +resource "sysdig_monitor_alert_v2_prometheus" "nr_frontend_prod_cpu_quota" { + name = "Prod Frontend CPU Requests Quota Alert" description = "Alert when the CPU requests usage is too high" severity = "medium" query = "sysdig_container_cpu_quota_used_percent{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-prod\",kube_deployment_name=\"nr-compliance-enforcement-prod-frontend\",container_name=\"nr-compliance-enforcement-prod-frontend\"} > 98" @@ -96,8 +96,8 @@ resource "sysdig_monitor_alert_v2_prometheus" "frontend_prod_cpu_quota" { app = "NatCom" } } -resource "sysdig_monitor_alert_v2_prometheus" "frontend_prod_mem_usage" { - name = "Frontend Mem Usage Alert" +resource "sysdig_monitor_alert_v2_prometheus" "nr_frontend_prod_mem_usage" { + name = "Prod Frontend Mem Usage Alert" description = "Alert when the mem usage is too high" severity = "medium" query = "sysdig_container_memory_used_percent{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-prod\",kube_deployment_name=\"nr-compliance-enforcement-prod-frontend\",container_name=\"nr-compliance-enforcement-prod-frontend\"} > 98" @@ -112,8 +112,8 @@ resource "sysdig_monitor_alert_v2_prometheus" "frontend_prod_mem_usage" { app = "NatCom" } } -resource "sysdig_monitor_alert_v2_prometheus" "frontend_prod_mem_limit" { - name = "Frontend Mem Limit Alert" +resource "sysdig_monitor_alert_v2_prometheus" "nr_frontend_prod_mem_limit" { + name = "Prod Frontend Mem Limit Alert" description = "Alert when the mem usage is near the limit for too long" severity = "high" query = "sysdig_container_memory_limit_used_percent{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-prod\",kube_deployment_name=\"nr-compliance-enforcement-prod-frontend\",container_name=\"nr-compliance-enforcement-prod-frontend\"} > 70" @@ -128,8 +128,8 @@ resource "sysdig_monitor_alert_v2_prometheus" "frontend_prod_mem_limit" { app = "NatCom" } } -resource "sysdig_monitor_alert_v2_prometheus" "frontend_prod_uptime_score" { - name = "Frontend Uptime Alert" +resource "sysdig_monitor_alert_v2_prometheus" "nr_frontend_prod_uptime_score" { + name = "Prod Frontend Uptime Alert" description = "Alert when the frontend container has too much downtime" severity = "high" query = "sysdig_container_up{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-prod\",kube_deployment_name=\"nr-compliance-enforcement-prod-frontend\",container_name=\"nr-compliance-enforcement-prod-frontend\"} < 0.7" @@ -144,8 +144,8 @@ resource "sysdig_monitor_alert_v2_prometheus" "frontend_prod_uptime_score" { app = "NatCom" } } -resource "sysdig_monitor_alert_v2_prometheus" "frontend_prod_http_silent" { - name = "Frontend Unresponsive Alert" +resource "sysdig_monitor_alert_v2_prometheus" "nr_frontend_prod_http_silent" { + name = "Prod Frontend Unresponsive Alert" description = "Alert when the frontend container has been unresponsive or silent for too long" severity = "high" query = "sysdig_container_net_http_request_count{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-prod\",kube_deployment_name=\"nr-compliance-enforcement-prod-frontend\",container_name=\"nr-compliance-enforcement-prod-frontend\"} < 0.1" @@ -160,8 +160,8 @@ resource "sysdig_monitor_alert_v2_prometheus" "frontend_prod_http_silent" { app = "NatCom" } } -resource "sysdig_monitor_alert_v2_prometheus" "frontend_prod_http_error_rate" { - name = "Frontend HTTP Error Rate Alert" +resource "sysdig_monitor_alert_v2_prometheus" "nr_frontend_prod_http_error_rate" { + name = "Prod Frontend HTTP Error Rate Alert" description = "Alert when the frontend container has too many HTTP errors over a period" severity = "high" query = "(sysdig_container_net_http_error_count{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-prod\",kube_deployment_name=\"nr-compliance-enforcement-prod-frontend\"} / sysdig_container_net_http_request_count{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-prod\",kube_deployment_name=\"nr-compliance-enforcement-prod-frontend\"} ) > 0.05" @@ -177,8 +177,8 @@ resource "sysdig_monitor_alert_v2_prometheus" "frontend_prod_http_error_rate" { } } ### Database Alerts -resource "sysdig_monitor_alert_v2_prometheus" "database_prod_cpu_quota" { - name = "Database CPU Requests Quota Alert" +resource "sysdig_monitor_alert_v2_prometheus" "nr_database_prod_cpu_quota" { + name = "Prod Database CPU Requests Quota Alert" description = "Alert when the CPU requests usage is too high" severity = "medium" query = "sysdig_container_cpu_quota_used_percent{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-prod\",kube_statefulset_name=\"nr-compliance-enforcement-prod-bitnami-pg\"} > 98" @@ -193,8 +193,8 @@ resource "sysdig_monitor_alert_v2_prometheus" "database_prod_cpu_quota" { app = "NatCom" } } -resource "sysdig_monitor_alert_v2_prometheus" "database_prod_mem_usage" { - name = "Database Mem Usage Alert" +resource "sysdig_monitor_alert_v2_prometheus" "nr_database_prod_mem_usage" { + name = "Prod Database Mem Usage Alert" description = "Alert when the mem usage is too high" severity = "medium" query = "sysdig_container_memory_used_percent{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-prod\",kube_statefulset_name=\"nr-compliance-enforcement-prod-bitnami-pg\"} > 98" @@ -209,8 +209,8 @@ resource "sysdig_monitor_alert_v2_prometheus" "database_prod_mem_usage" { app = "NatCom" } } -resource "sysdig_monitor_alert_v2_prometheus" "database_prod_mem_limit" { - name = "Database Mem Limit Alert" +resource "sysdig_monitor_alert_v2_prometheus" "nr_database_prod_mem_limit" { + name = "Prod Database Mem Limit Alert" description = "Alert when the mem usage is near the limit for too long" severity = "high" query = "sysdig_container_memory_limit_used_percent{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-prod\",kube_statefulset_name=\"nr-compliance-enforcement-prod-bitnami-pg\"} > 70" @@ -225,8 +225,8 @@ resource "sysdig_monitor_alert_v2_prometheus" "database_prod_mem_limit" { app = "NatCom" } } -resource "sysdig_monitor_alert_v2_prometheus" "database_prod_uptime_score" { - name = "Database Uptime Alert" +resource "sysdig_monitor_alert_v2_prometheus" "nr_database_prod_uptime_score" { + name = "Prod Database Uptime Alert" description = "Alert when the database container has too much downtime" severity = "high" query = "sysdig_container_up{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-prod\",kube_statefulset_name=\"nr-compliance-enforcement-prod-bitnami-pg\"} < 0.7" @@ -241,8 +241,8 @@ resource "sysdig_monitor_alert_v2_prometheus" "database_prod_uptime_score" { app = "NatCom" } } -resource "sysdig_monitor_alert_v2_prometheus" "database_prod_storage_usage" { - name = "Database Storage Alert" +resource "sysdig_monitor_alert_v2_prometheus" "nr_database_prod_storage_usage" { + name = "Prod Database Storage Alert" description = "Alert when the database storage usage is too high" severity = "high" query = "sysdig_fs_used_percent{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-prod\",kube_statefulset_name=\"nr-compliance-enforcement-prod-bitnami-pg\"} > 70" diff --git a/terraform/alerts_test.tf b/terraform/alerts_test.tf index 055389e79..9832efcd9 100644 --- a/terraform/alerts_test.tf +++ b/terraform/alerts_test.tf @@ -1,6 +1,6 @@ ### Backend Alerts -resource "sysdig_monitor_alert_v2_prometheus" "backend_test_cpu_quota" { - name = "Backend CPU Requests Quota Alert" +resource "sysdig_monitor_alert_v2_prometheus" "nr_backend_test_cpu_quota" { + name = "Test Backend CPU Requests Quota Alert" description = "Alert when the CPU requests usage is too high" severity = "medium" query = "sysdig_container_cpu_quota_used_percent{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-test\",kube_deployment_name=\"nr-compliance-enforcement-test-backend\",container_name=\"nr-compliance-enforcement-test-backend\"} > 98" @@ -15,8 +15,8 @@ resource "sysdig_monitor_alert_v2_prometheus" "backend_test_cpu_quota" { app = "NatCom" } } -resource "sysdig_monitor_alert_v2_prometheus" "backend_test_mem_usage" { - name = "Backend Mem Usage Alert" +resource "sysdig_monitor_alert_v2_prometheus" "nr_backend_test_mem_usage" { + name = "Test Backend Mem Usage Alert" description = "Alert when the mem usage is too high" severity = "medium" query = "sysdig_container_memory_used_percent{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-test\",kube_deployment_name=\"nr-compliance-enforcement-test-backend\",container_name=\"nr-compliance-enforcement-test-backend\"} > 98" @@ -31,8 +31,8 @@ resource "sysdig_monitor_alert_v2_prometheus" "backend_test_mem_usage" { app = "NatCom" } } -resource "sysdig_monitor_alert_v2_prometheus" "backend_test_mem_limit" { - name = "Backend Mem Limit Alert" +resource "sysdig_monitor_alert_v2_prometheus" "nr_backend_test_mem_limit" { + name = "Test Backend Mem Limit Alert" description = "Alert when the mem usage is near the limit for too long" severity = "high" query = "sysdig_container_memory_limit_used_percent{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-test\",kube_deployment_name=\"nr-compliance-enforcement-test-backend\",container_name=\"nr-compliance-enforcement-test-backend\"} > 70" @@ -47,8 +47,8 @@ resource "sysdig_monitor_alert_v2_prometheus" "backend_test_mem_limit" { app = "NatCom" } } -resource "sysdig_monitor_alert_v2_prometheus" "backend_test_uptime_score" { - name = "Backend Uptime Alert" +resource "sysdig_monitor_alert_v2_prometheus" "nr_backend_test_uptime_score" { + name = "Test Backend Uptime Alert" description = "Alert when the backend container has too much downtime" severity = "high" query = "sysdig_container_up{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-test\",kube_deployment_name=\"nr-compliance-enforcement-test-backend\",container_name=\"nr-compliance-enforcement-test-backend\"} < 0.7" @@ -63,8 +63,8 @@ resource "sysdig_monitor_alert_v2_prometheus" "backend_test_uptime_score" { app = "NatCom" } } -resource "sysdig_monitor_alert_v2_prometheus" "backend_test_http_silent" { - name = "Backend Unresponsive Alert" +resource "sysdig_monitor_alert_v2_prometheus" "nr_backend_test_http_silent" { + name = "Test Backend Unresponsive Alert" description = "Alert when the backend container has been unresponsive or silent for too long" severity = "high" query = "sysdig_container_net_http_request_count{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-test\",kube_deployment_name=\"nr-compliance-enforcement-test-backend\",container_name=\"nr-compliance-enforcement-test-backend\"} < 0.1" @@ -80,8 +80,8 @@ resource "sysdig_monitor_alert_v2_prometheus" "backend_test_http_silent" { } } ### Frontend Alerts -resource "sysdig_monitor_alert_v2_prometheus" "frontend_test_cpu_quota" { - name = "Frontend CPU Requests Quota Alert" +resource "sysdig_monitor_alert_v2_prometheus" "nr_frontend_test_cpu_quota" { + name = "Test Frontend CPU Requests Quota Alert" description = "Alert when the CPU requests usage is too high" severity = "medium" query = "sysdig_container_cpu_quota_used_percent{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-test\",kube_deployment_name=\"nr-compliance-enforcement-test-frontend\",container_name=\"nr-compliance-enforcement-test-frontend\"} > 98" @@ -96,8 +96,8 @@ resource "sysdig_monitor_alert_v2_prometheus" "frontend_test_cpu_quota" { app = "NatCom" } } -resource "sysdig_monitor_alert_v2_prometheus" "frontend_test_mem_usage" { - name = "Frontend Mem Usage Alert" +resource "sysdig_monitor_alert_v2_prometheus" "nr_frontend_test_mem_usage" { + name = "Test Frontend Mem Usage Alert" description = "Alert when the mem usage is too high" severity = "medium" query = "sysdig_container_memory_used_percent{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-test\",kube_deployment_name=\"nr-compliance-enforcement-test-frontend\",container_name=\"nr-compliance-enforcement-test-frontend\"} > 98" @@ -112,8 +112,8 @@ resource "sysdig_monitor_alert_v2_prometheus" "frontend_test_mem_usage" { app = "NatCom" } } -resource "sysdig_monitor_alert_v2_prometheus" "frontend_test_mem_limit" { - name = "Frontend Mem Limit Alert" +resource "sysdig_monitor_alert_v2_prometheus" "nr_frontend_test_mem_limit" { + name = "Test Frontend Mem Limit Alert" description = "Alert when the mem usage is near the limit for too long" severity = "high" query = "sysdig_container_memory_limit_used_percent{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-test\",kube_deployment_name=\"nr-compliance-enforcement-test-frontend\",container_name=\"nr-compliance-enforcement-test-frontend\"} > 70" @@ -128,8 +128,8 @@ resource "sysdig_monitor_alert_v2_prometheus" "frontend_test_mem_limit" { app = "NatCom" } } -resource "sysdig_monitor_alert_v2_prometheus" "frontend_test_uptime_score" { - name = "Frontend Uptime Alert" +resource "sysdig_monitor_alert_v2_prometheus" "nr_frontend_test_uptime_score" { + name = "Test Frontend Uptime Alert" description = "Alert when the frontend container has too much downtime" severity = "high" query = "sysdig_container_up{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-test\",kube_deployment_name=\"nr-compliance-enforcement-test-frontend\",container_name=\"nr-compliance-enforcement-test-frontend\"} < 0.7" @@ -144,8 +144,8 @@ resource "sysdig_monitor_alert_v2_prometheus" "frontend_test_uptime_score" { app = "NatCom" } } -resource "sysdig_monitor_alert_v2_prometheus" "frontend_test_http_silent" { - name = "Frontend Unresponsive Alert" +resource "sysdig_monitor_alert_v2_prometheus" "nr_frontend_test_http_silent" { + name = "Test Frontend Unresponsive Alert" description = "Alert when the frontend container has been unresponsive or silent for too long" severity = "high" query = "sysdig_container_net_http_request_count{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-test\",kube_deployment_name=\"nr-compliance-enforcement-test-frontend\",container_name=\"nr-compliance-enforcement-test-frontend\"} < 0.1" @@ -160,8 +160,8 @@ resource "sysdig_monitor_alert_v2_prometheus" "frontend_test_http_silent" { app = "NatCom" } } -resource "sysdig_monitor_alert_v2_prometheus" "frontend_test_http_error_rate" { - name = "Frontend HTTP Error Rate Alert" +resource "sysdig_monitor_alert_v2_prometheus" "nr_frontend_test_http_error_rate" { + name = "Test Frontend HTTP Error Rate Alert" description = "Alert when the frontend container has too many HTTP errors over a period" severity = "high" query = "(sysdig_container_net_http_error_count{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-test\",kube_deployment_name=\"nr-compliance-enforcement-test-frontend\"} / sysdig_container_net_http_request_count{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-test\",kube_deployment_name=\"nr-compliance-enforcement-test-frontend\"} ) > 0.05" @@ -177,8 +177,8 @@ resource "sysdig_monitor_alert_v2_prometheus" "frontend_test_http_error_rate" { } } ### Databsae Alerts -resource "sysdig_monitor_alert_v2_prometheus" "database_test_cpu_quota" { - name = "Database CPU Requests Quota Alert" +resource "sysdig_monitor_alert_v2_prometheus" "nr_database_test_cpu_quota" { + name = "Test Database CPU Requests Quota Alert" description = "Alert when the CPU requests usage is too high" severity = "medium" query = "sysdig_container_cpu_quota_used_percent{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-test\",kube_statefulset_name=\"nr-compliance-enforcement-test-bitnami-pg\"} > 98" @@ -193,8 +193,8 @@ resource "sysdig_monitor_alert_v2_prometheus" "database_test_cpu_quota" { app = "NatCom" } } -resource "sysdig_monitor_alert_v2_prometheus" "database_test_mem_usage" { - name = "Database Mem Usage Alert" +resource "sysdig_monitor_alert_v2_prometheus" "nr_database_test_mem_usage" { + name = "Test Database Mem Usage Alert" description = "Alert when the mem usage is too high" severity = "medium" query = "sysdig_container_memory_used_percent{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-test\",kube_statefulset_name=\"nr-compliance-enforcement-test-bitnami-pg\"} > 98" @@ -209,8 +209,8 @@ resource "sysdig_monitor_alert_v2_prometheus" "database_test_mem_usage" { app = "NatCom" } } -resource "sysdig_monitor_alert_v2_prometheus" "database_test_mem_limit" { - name = "Database Mem Limit Alert" +resource "sysdig_monitor_alert_v2_prometheus" "nr_database_test_mem_limit" { + name = "Test Database Mem Limit Alert" description = "Alert when the mem usage is near the limit for too long" severity = "high" query = "sysdig_container_memory_limit_used_percent{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-test\",kube_statefulset_name=\"nr-compliance-enforcement-test-bitnami-pg\"} > 70" @@ -225,8 +225,8 @@ resource "sysdig_monitor_alert_v2_prometheus" "database_test_mem_limit" { app = "NatCom" } } -resource "sysdig_monitor_alert_v2_prometheus" "database_test_uptime_score" { - name = "Database Uptime Alert" +resource "sysdig_monitor_alert_v2_prometheus" "nr_database_test_uptime_score" { + name = "Test Database Uptime Alert" description = "Alert when the database container has too much downtime" severity = "high" query = "sysdig_container_up{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-test\",kube_statefulset_name=\"nr-compliance-enforcement-test-bitnami-pg\"} < 0.7" @@ -241,8 +241,8 @@ resource "sysdig_monitor_alert_v2_prometheus" "database_test_uptime_score" { app = "NatCom" } } -resource "sysdig_monitor_alert_v2_prometheus" "database_test_storage_usage" { - name = "Database Storage Alert" +resource "sysdig_monitor_alert_v2_prometheus" "nr_database_test_storage_usage" { + name = "Test Database Storage Alert" description = "Alert when the database storage usage is too high" severity = "high" query = "sysdig_fs_used_percent{kube_cluster_name=\"silver\",kube_namespace_name=\"c1c7ed-test\",kube_statefulset_name=\"nr-compliance-enforcement-test-bitnami-pg\"} > 70"