Giter Club home page Giter Club logo

terraform-newrelic-alerting's Introduction

terraform-newrelic-alerting Module

A Terraform module for New Relic alerting with following preconfigured alerts for an application:

  • High CPU Utilisation
  • High Memory Utilisation
  • High Disk Utilisation
  • Host Not Reporting
  • Service Not Running
  • 5XX Error High
  • Database Call Slow
  • Web Requests High Latency
  • Transactions High Latency
  • Apdex Error
  • Error Percentage
  • Response Time Background Slow
  • Response Time Web Slow

And it also allows setup of any other type of alert using NRQL. For more info, look into alerts.tf file.

It can be used as (though there are more tweaking can be done):

module "newrelic_alerts_sev1" {
  source                                              = "<PATH/TO/terraform-newrelic-alerting/"
  # newrelic_alert_policy_name                         = "<EXISTING_POLICY_NAME_IF_THESE_ALERTRULES_NEEDS_TO_BE_CREATED_INSIDE_IT_INSTEAD_OF_NEW_POLICY>
  service_name                                        = "EXAMPLE-APP"                  # put here name of application
  severity                                            = "severity1"
  nr_service_name                                     = "<NEWRELIC-APP-NAME>"          # put here newrelic app name
  cpu_utilisation_threshold_duration_minutes          = "15"
  memory_free_threshold_byte                          = "524288000"                    # 500MB
  disk_free_threshold_percentage                      = "30"
  # service_unavailable_threshold_duration_minutes      = "5"
  # not_running_process_where_query                     = "commandName IN ('supervisord')" # Process monitoring NRQL where -->
  error_5xx_threshold_count                           = "10"
  database_transcation_threshold_seconds              = 1
  web_transaction_threshold_seconds                   = 1
  transaction_threshold_seconds                       = 5
  apdex_threshold                                     = "0.8"
  error_percentage_threshold                          = 10
  response_time_background_threshold_seconds          = 3
  response_time_web_threshold_seconds                 = 1
  runbook_url                                         = "<RUNBOOK-URL>"               # Put here runbook url of application
}

Any other type of alert can be setup using NRQL:

module "newrelic_alerts_sev3_RabbimqHighMessages" {
  source                       = "<PATH/TO/terraform-newrelic-alerting/"
  # newrelic_alert_policy_name   = "<EXISTING_POLICY_NAME_IF_THESE_ALERTRULES_NEEDS_TO_BE_CREATED_INSIDE_IT_INSTEAD_OF_NEW_POLICY>
  service_name                 = "RMQ"                        # put here name of application
  severity                     = "severity3"
  nr_service_name              = ""
  runbook_url                  = "<RUNBOOK-URL>"              # Put here runbook url of application
  nrql_generic_name            = "Messages_Explodes"
  nrql_generic_query           = "SELECT average(queue.totalMessages) FROM RabbitmqQueueSample WHERE displayName NOT LIKE '%celery%' FACET displayName"
  nrql_generic_operator        = "above"
  nrql_generic_threshold       = 10000
}

terraform-newrelic-alerting's People

Contributors

rahulwa 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.