All Projects → terraform-aws-modules → Terraform Aws Cloudwatch

terraform-aws-modules / Terraform Aws Cloudwatch

Licence: other
Terraform module which creates Cloudwatch resources on AWS

Labels

Projects that are alternatives of or similar to Terraform Aws Cloudwatch

Intro To Terraform
Sample code for the blog post series "A Comprehensive Guide to Terraform."
Stars: ✭ 550 (+1241.46%)
Mutual labels:  aws, hcl
Terraform Aws Jenkins Ha Agents
A terraform module for a highly available Jenkins deployment.
Stars: ✭ 41 (+0%)
Mutual labels:  aws, hcl
Terraform Aws Secure Baseline
Terraform module to set up your AWS account with the secure baseline configuration based on CIS Amazon Web Services Foundations and AWS Foundational Security Best Practices.
Stars: ✭ 596 (+1353.66%)
Mutual labels:  aws, hcl
Terraformer
CLI tool to generate terraform files from existing infrastructure (reverse Terraform). Infrastructure to Code
Stars: ✭ 6,316 (+15304.88%)
Mutual labels:  aws, hcl
Terraform Sqs Lambda Trigger Example
Example on how to create a AWS Lambda triggered by SQS in Terraform
Stars: ✭ 31 (-24.39%)
Mutual labels:  aws, hcl
Infrastructure As Code Talk
Sample code for the talk "Infrastructure-as-code: running microservices on AWS with Docker, ECS, and Terraform"
Stars: ✭ 520 (+1168.29%)
Mutual labels:  aws, hcl
Lambda Deployment Example
Automated Lambda Deployments with Terraform & CodePipeline
Stars: ✭ 25 (-39.02%)
Mutual labels:  aws, hcl
Terraform Aws Ec2 Instance
Terraform module which creates EC2 instance(s) on AWS
Stars: ✭ 344 (+739.02%)
Mutual labels:  aws, hcl
Terraform Aws Cross Account Role
A Terraform module to create an IAM Role for Cross Account delegation.
Stars: ✭ 30 (-26.83%)
Mutual labels:  aws, hcl
Terra Aws Core Kube
Terraform configuration to bootstrap a Kubernetes Cluster on top of CoreOS using AWS-EC2 instances
Stars: ✭ 10 (-75.61%)
Mutual labels:  aws, hcl
Terraform Aws Rds
Terraform module which creates RDS resources on AWS
Stars: ✭ 430 (+948.78%)
Mutual labels:  aws, hcl
Terraform Aws Ecs Fargate
Terraform module which creates ECS Fargate resources on AWS.
Stars: ✭ 35 (-14.63%)
Mutual labels:  aws, hcl
Inframap
Read your tfstate or HCL to generate a graph specific for each provider, showing only the resources that are most important/relevant.
Stars: ✭ 430 (+948.78%)
Mutual labels:  aws, hcl
Karch
A Terraform module to create and maintain Kubernetes clusters on AWS easily, relying entirely on kops
Stars: ✭ 38 (-7.32%)
Mutual labels:  aws, hcl
Terratag
Terratag is a CLI tool that enables users of Terraform to automatically create and maintain tags across their entire set of AWS, Azure, and GCP resources
Stars: ✭ 385 (+839.02%)
Mutual labels:  aws, hcl
Terraform Modules
Terraform Modules
Stars: ✭ 25 (-39.02%)
Mutual labels:  aws, hcl
Terraform Aws Iam
Terraform module which creates IAM resources on AWS
Stars: ✭ 314 (+665.85%)
Mutual labels:  aws, hcl
Terraform Aws Security Group
Terraform module which creates EC2-VPC security groups on AWS
Stars: ✭ 326 (+695.12%)
Mutual labels:  aws, hcl
Cloudguardiaas
Check Point CloudGuard Network Security repository containing solution templates, Terraform templates, tools and scripts for deploying and configuring CloudGuard Network Security products.
Stars: ✭ 27 (-34.15%)
Mutual labels:  aws, hcl
Ebs bckup
Stars: ✭ 32 (-21.95%)
Mutual labels:  aws, hcl

AWS Cloudwatch Terraform module

Terraform module which creates Cloudwatch resources on AWS.

This type of resources are supported:

Usage

Log metric filter

module "log_metric_filter" {
  source  = "terraform-aws-modules/cloudwatch/aws//modules/log-metric-filter"
  version = "~> 1.0"

  log_group_name = "my-application-logs"

  name    = "error-metric"
  pattern = "ERROR"

  metric_transformation_namespace = "MyApplication"
  metric_transformation_name      = "ErrorCount"
}

Read Filter and Pattern Syntax for explanation of pattern.

Metric alarm

module "metric_alarm" {
  source  = "terraform-aws-modules/cloudwatch/aws//modules/metric-alarm"
  version = "~> 1.0"

  alarm_name          = "my-application-logs-errors"
  alarm_description   = "Bad errors in my-application-logs"
  comparison_operator = "GreaterThanOrEqualToThreshold"
  evaluation_periods  = 1
  threshold           = 10
  period              = 60
  unit                = "Count"

  namespace   = "MyApplication"
  metric_name = "ErrorCount"
  statistic   = "Maximum"

  alarm_actions = ["arn:aws:sns:eu-west-1:835367859852:my-sns-queue"]
}

Metric alarms by multiple dimensions

This submodule is useful when you need to create very similar alarms where only dimensions are different (eg, multiple AWS Lambda functions), but the rest of arguments are the same.

module "metric_alarms" {
  source  = "terraform-aws-modules/cloudwatch/aws//modules/metric-alarms-by-multiple-dimensions"
  version = "~> 1.0"

  alarm_name          = "lambda-duration-"
  alarm_description   = "Lambda duration is too high"
  comparison_operator = "GreaterThanOrEqualToThreshold"
  evaluation_periods  = 1
  threshold           = 10
  period              = 60
  unit                = "Milliseconds"

  namespace   = "AWS/Lambda"
  metric_name = "Duration"
  statistic   = "Maximum"

  dimensions = {
    "lambda1" = {
      FunctionName = "index"
    },
    "lambda2" = {
      FunctionName = "signup"
    },
  }

  alarm_actions = ["arn:aws:sns:eu-west-1:835367859852:my-sns-queue"]
}

Check out list of all AWS services that publish CloudWatch metrics for detailed information about each supported service.

CIS AWS Foundations Controls: Metrics + Alarms

module "cis_alarms" {
  source  = "terraform-aws-modules/cloudwatch/aws//modules/cis-alarms"
  version = "~> 1.0"

  log_group_name = "my-cloudtrail-logs"
  alarm_actions  = ["arn:aws:sns:eu-west-1:835367859852:my-sns-queue"]
}

AWS CloudTrail normally publishes logs into AWS CloudWatch Logs. This module creates log metric filters together with metric alarms according to CIS AWS Foundations Benchmark v1.2.0. Read more about CIS AWS Foundations Controls.

Examples

Authors

Module managed by Anton Babenko.

The development of this module was sponsored by indebted.co.

License

Apache 2 Licensed. See LICENSE for full details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].