-
Notifications
You must be signed in to change notification settings - Fork 5
/
cloudwatch.tf
37 lines (30 loc) · 1.22 KB
/
cloudwatch.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
resource "aws_cloudwatch_metric_alarm" "concourse_workers_high_cpu" {
alarm_name = "concourse-workers-high-cpu"
comparison_operator = "GreaterThanThreshold"
evaluation_periods = "1"
metric_name = "CPUUtilization"
namespace = "AWS/EC2Spot"
period = "300"
statistic = "Average"
threshold = "60"
dimensions {
FleetRequestId = "${aws_spot_fleet_request.concourse_workers.id}"
}
alarm_description = "This metric monitors Concourse Worker cpu utilization"
// alarm_actions = ["${aws_appautoscaling_policy.concourse_workers_scale.arn}"]
}
resource "aws_cloudwatch_metric_alarm" "concourse_workers_low_cpu" {
alarm_name = "concourse-workers-low-cpu"
comparison_operator = "LessThanThreshold"
evaluation_periods = "5"
metric_name = "CPUUtilization"
namespace = "AWS/EC2Spot"
period = "360"
statistic = "Average"
threshold = "20"
dimensions {
FleetRequestId = "${aws_spot_fleet_request.concourse_workers.id}"
}
alarm_description = "This metric monitors Concourse Worker cpu utilization"
// alarm_actions = ["${aws_appautoscaling_policy.concourse_workers_scale.arn}"]
}