Skip to content

Commit 9c5f06f

Browse files
fix: alerts (#2538)
1 parent de531dc commit 9c5f06f

4 files changed

Lines changed: 12 additions & 3 deletions

File tree

test/k8s-canaries/terraform/production/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ module "alerts" {
9191
threshold = 210000
9292
duration = 21600
9393
operator = "above"
94-
template_name = "./alert_nrql_templates/generic_metric_threshold.tftpl"
94+
template_name = "./alert_nrql_templates/generic_metric_derivative.tftpl"
9595
},
9696
{
9797
name = "Agent Control container"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
SELECT ${metric}
2+
FROM ${sample}
3+
WHERE (
4+
clusterName = '${instance_id}'
5+
AND `label.app.kubernetes.io/name` = 'agent-control'
6+
%{ for k, v in wheres }
7+
AND ${k}='${v}'
8+
%{ endfor }
9+
)

test/k8s-canaries/terraform/staging/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ module "alerts" {
9292
threshold = 210000
9393
duration = 21600
9494
operator = "above"
95-
template_name = "./alert_nrql_templates/generic_metric_threshold.tftpl"
95+
template_name = "./alert_nrql_templates/generic_metric_derivative.tftpl"
9696
},
9797
{
9898
name = "Agent Control container"

test/terraform/modules/nr_alerts/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ resource "newrelic_notification_destination" "email" {
7575
type = "EMAIL"
7676

7777
property {
78-
key = "recipients"
78+
key = "email"
7979
value = var.emails
8080
}
8181
}

0 commit comments

Comments
 (0)