Skip to content

Commit

Permalink
aws: Remove a not working cloudwatch alarm (#171)
Browse files Browse the repository at this point in the history
* aws: Remove a not working cloudwatch alarm

* Update bootstrap.sh
  • Loading branch information
lens0021 authored Apr 10, 2022
1 parent 3fc945b commit a33f13c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
20 changes: 0 additions & 20 deletions aws/cloudwatch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,26 +49,6 @@ resource "aws_cloudwatch_metric_alarm" "femiwiki_disk_used_cloud_watch_alarm" {
alarm_actions = [aws_sns_topic.cloudwatch_alarms_topic.arn]
}

resource "aws_cloudwatch_metric_alarm" "persistent_data_mysql_used_cloud_watch_alarm" {
alarm_name = "persistent data mysql disk used"
namespace = "CWAgent"
metric_name = "disk_used_percent"
period = 300
statistic = "Maximum"
dimensions = {
# TODO: Change dynamically
"device" = "nvme3n1"
"fstype" = "ext4"
"host" = aws_instance.femiwiki.private_dns
"path" = "/opt/nomad/client/csi/node/aws-ebs0/staging/mysql/rw-file-system-single-node-writer"
}
threshold = 90
comparison_operator = "GreaterThanThreshold"
datapoints_to_alarm = 1
evaluation_periods = 1
alarm_actions = [aws_sns_topic.cloudwatch_alarms_topic.arn]
}

resource "aws_cloudwatch_metric_alarm" "bounce_rate" {
provider = aws.us

Expand Down
3 changes: 1 addition & 2 deletions aws/res/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ cat <<'EOF' > /opt/aws/amazon-cloudwatch-agent/etc/config.json
"used_percent"
],
"resources": [
"/",
"/opt/nomad/client/csi/node/aws-ebs0/staging/mysql/rw-file-system-single-node-writer"
"/"
],
"ignore_file_system_types": [
"sysfs", "tmpfs", "devtmpfs", "overlay"
Expand Down

0 comments on commit a33f13c

Please sign in to comment.