Giter VIP home page Giter VIP logo

tf-module-cloudwatch's Introduction

alt text

tf-module-cloudWatch

Terraform module for creating Service Monitoring in cloudWatch.

This module is service agnostic, allowing us to monitor a multitude of services such as:

  • EC2
  • SQS
  • Lambda

Requirements

  • Terraform
  • AWS Account

Dependencies

  • AWS Services.

Example of Use

module cloud_watch_metric_scaleup {
  source = "https://github.com/leandromoreirati/tf-module-cloudWatch.git"

  name       = "RESOURCE_NAME"

  comparison_operator = "${var.comparison_operator}"
  metric_name         = "${var.metric_name}"
  namespace           = "${var.namespace}"
  period              = "${var.period}"
  evaluation_periods  = "${var.evaluation_periods}"
  statistic           = "${var.statistic}"
  threshold           = "${var.threshold_scaleup}"   
  treat_missing_data  = "${var.treat_missing_data}"   
  alarm_description   = "${var.alarm_description_scaleup}"   
  actions_enabled     = "${var.actions_enabled}"   
  alarm_actions       = "${var.alarm_actions}"   
  ok_actions          = "${var.ok_actions}"   
  insufficient_data_actions = "${var.insufficient_data_actions}"
  AutoScalingGroupName = "${"${module.auto_scaling_group.auto_scaling_group_name}"}"

  tags = {
    "Tag01" = "Value01"
    "Tag02" = "Value02"
    "Tag03" = "Value03"
    "Tag04" = "Value04"
  }
}
module cloud_watch_metric_scaledown {
  source = "https://github.com/leandromoreirati/tf-module-cloudWatch.git"

  name       = "${var.my_team}-${var.product}-${var.environment}-scaledown"

  comparison_operator = "${var.comparison_operator}"
  metric_name         = "${var.metric_name}"
  namespace           = "${var.namespace}"
  period              = "${var.period}"
  evaluation_periods  = "${var.evaluation_periods}"
  statistic           = "${var.statistic}"
  threshold           = "${var.threshold_scaledown}"   
  treat_missing_data  = "${var.treat_missing_data}"   
  alarm_description   = "${var.alarm_description_scaledown}"   
  actions_enabled     = "${var.actions_enabled}"   
  alarm_actions       = "${var.alarm_actions}"   
  ok_actions          = "${var.ok_actions}"   
  insufficient_data_actions = "${var.insufficient_data_actions}"
  AutoScalingGroupName = "${"${module.auto_scaling_group.auto_scaling_group_name}"}"

  tags = {
    "Name"           = "${var.my_team}-${var.product}-${var.environment}"
    "Application"    = "${var.my_team}-${var.product}"
    "Environment"    = "${var.environment}"
    "Service_type"   = "${var.service_type}"
    "Business_owner" = "${var.business_owner}"
  }
}

Variables

Nome Descrição Default
comparison_operator Mathematical operator used to compare metric statistics ""
metric_name Alarm Name Associated with Metric ""
namespace Alarm namespace associated with metric ""
period The period in seconds that the statistic is to be applied ""
evaluation_periods The number of periods to be evaluated ""
statistic The statistic that will be applied to the alarm Average
threshold_scaleup The value at which the statistics will be compared (scaleup) ""
threshold_scaledown The value to which the statistics will be compared (scaledown) ""
treat_missing_data Defines how the alarm should handle missing data notBreaching
alarm_description_scaleup Description of scaleup alarm ""
alarm_description_scaledown Scaledown Alarm Description ""
actions_enabled Defines whether or not actions should be performed on alarm true
alarm_actions List of actions to perform on alarm ""
ok_actions List of actions to perform on alarm OK ""
insufficient_data_actions List of actions to take on INSUFFICIENT_DATA case ""
AutoScalingGroupName Alarm dimension associated with metric ""

Outputs

Nome Valor
cloudWatch_metrics_arn aws_cloudwatch_metric_alarm.cloudwatch_metric_alarm.arn
cloudWatch_metrics_id aws_cloudwatch_metric_alarm.cloudwatch_metric_alarm.id

External Documentation

Created Resources

  • CloudWatch Service Monitoring

tf-module-cloudwatch's People

Watchers

Leandro Moreira avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.