Skip to content

Commit

Permalink
Comment updates
Browse files Browse the repository at this point in the history
  • Loading branch information
rfairburn committed Nov 1, 2023
1 parent 777206b commit 9ace9e5
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
19 changes: 19 additions & 0 deletions infrastructure/dogfood/terraform/aws-tf-module/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 16 additions & 1 deletion infrastructure/dogfood/terraform/aws-tf-module/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,8 @@ module "osquery-carve" {
}

module "monitoring" {
source = "github.com/fleetdm/fleet//terraform/addons/monitoring?ref=tf-mod-addon-monitoring-v1.0.0"
# source = "github.com/fleetdm/fleet//terraform/addons/monitoring?ref=tf-mod-addon-monitoring-v1.0.0"
source = "../../../../terraform/addons/monitoring"
customer_prefix = local.customer
fleet_ecs_service_name = module.main.byo-vpc.byo-db.byo-ecs.service.name
fleet_min_containers = module.main.byo-vpc.byo-db.byo-ecs.service.desired_count
Expand All @@ -274,11 +275,25 @@ module "monitoring" {
alb_arn_suffix = module.main.byo-vpc.byo-db.alb.lb_arn_suffix
sns_topic_arns_map = {
alb_httpcode_5xx = [module.notify_slack.slack_topic_arn]
cron_monitoring = [module.notify_slack.slack_topic_arn]
}
mysql_cluster_members = module.main.byo-vpc.rds.cluster_members
# The cloudposse module seems to have a nested list here.
redis_cluster_members = module.main.byo-vpc.redis.member_clusters[0]
acm_certificate_arn = module.acm.acm_certificate_arn
cron_monitoring = {
mysql_host = module.main.byo-vpc.rds.cluster_reader_endpoint
mysql_database = module.main.byo-vpc.rds.cluster_database_name
mysql_user = module.main.byo-vpc.rds.cluster_master_username
mysql_password_secret_name = module.main.byo-vpc.secrets.secret_ids["${local.customer}-database-password"]
rds_security_group_id = module.main.byo-vpc.rds.security_group_id
subnet_ids = module.main.vpc.private_subnets
vpc_id = module.main.vpc.vpc_id
# Format of https://pkg.go.dev/time#ParseDuration
delay_tolerance = "2h"
# Interval format for: https://docs.aws.amazon.com/scheduler/latest/UserGuide/schedule-types.html#rate-based
run_interval = "1 hour"
}
}

module "logging_alb" {
Expand Down
3 changes: 1 addition & 2 deletions terraform/addons/monitoring/lambda/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@ func checkDB(sess *session.Session) (err error) {
}
}

// select name, status, updated_at from cron_stats where id in (select max(id) from cron_stats group by name);

return nil
}

Expand Down Expand Up @@ -180,6 +178,7 @@ func main() {
}
}

// When running from Lambda, this should be read from the environment.
if options.LambdaRuntimeAPI != "" {
log.Printf("Starting Lambda handler.")
lambda.Start(handler)
Expand Down

0 comments on commit 9ace9e5

Please sign in to comment.