Skip to content

Latest commit

 

History

History
39 lines (29 loc) · 1.28 KB

README.md

File metadata and controls

39 lines (29 loc) · 1.28 KB

terraform-newrelic-monitoring

This Terraform module creates New Relic alerts and a dashboard to monitor an application. It also allows for sending notifications to VictorOps.

Example Usage

provider "newrelic" {
  api_key = "Your New Relic API key"
}

module "newrelic_monitoring" {
  source  = "vistaprint/monitoring/newrelic"
  version = "0.0.2"

  newrelic_app_name                 = "Your app name"
  newrelic_fully_qualified_app_name = "Team/PRD/App"
  service_url                       = "https://your-service-url.com"

  enable_victorops_notifications   = true
  victorops_api_key                = "Your VictorOps API key"
  victorops_urgent_routing_key     = "your-team-urgent"
  victorops_non_urgent_routing_key = "your-team-non-urgent"
}

See variables.tf for more information on the input variables that the module accepts. For instance, the default values for an alert's duration and threshold can be overridden. The following example shows how to do so:

module "newrelic_monitoring" {
  source  = "vistaprint/monitoring/newrelic"
  version = "0.0.2"

  # some fields ommitted (see previous example)

  error_rate_5xx_duration  = 10 # minutes
  error_rate_5xx_threshold = 5  # percentage
}