Skip to content

Commit

Permalink
use full arn for lb dimension
Browse files Browse the repository at this point in the history
  • Loading branch information
roncitrus committed Jul 9, 2024
1 parent a4216e0 commit fe9c754
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
16 changes: 10 additions & 6 deletions terraform/environments/cdpt-ifs/monitoring.tf
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
data "aws_lb" "cdpt-ifs-lb" {
name = "cdpt-ifs-lb"
}

resource "aws_sns_topic" "lb_5xx_alarm_topic" {
name = "lb_5xx_alarm_topic"
}

resource "aws_cloudwatch_metric_alarm" "lb_5xx_errors" {
alarm_name = "lb-5xx-errors"
comparison_operator = "GreaterThanOrEqualToThreshold"
Expand All @@ -10,13 +18,9 @@ resource "aws_cloudwatch_metric_alarm" "lb_5xx_errors" {
alarm_description = "This metric monitors 5xx errors on the targets behind the load balancer"
alarm_actions = [aws_sns_topic.lb_5xx_alarm_topic.arn]
dimensions = {
LoadBalancer = "${local.application_name}-lb"
LoadBalancer = "data.aws_lb.cdpt-ifs-lb.arn"
}
treat_missing_data = "notBreaching"
}

resource "aws_sns_topic" "lb_5xx_alarm_topic" {
name = "lb_5xx_alarm_topic"
treat_missing_data = "missing"
}

# Pager duty integration
Expand Down
3 changes: 3 additions & 0 deletions terraform/environments/cdpt-ifs/nohup.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nohup: ./ping500.sh: No such file or directory
nohup: ./ping500.sh: No such file or directory
nohup: ./ping500.sh: No such file or directory

0 comments on commit fe9c754

Please sign in to comment.