• /
  • ログイン

AWS CloudFormation integration

New Relic’s AWS CloudFormation integration allows you to add alert conditions to new or existing CloudFormation stacks using the New Relic alerts resource provider. This document explains how to activate and use this integration.

Features

AWS CloudFormation is an Amazon Web Services (AWS) service that allows you to use programming languages or a simple text file to model and provision, in an automated and secure manner, all the resources needed for your applications across all regions and accounts. It allows you to simply create and duplicate a collection of AWS resources, known as a stack. Whenever a stack is generated, AWS CloudFormation provisions the resources that are specified in your template.

Using the CloudFormation integration for New Relic, you can add alert conditions to your CloudFormation template using our custom resource provider, giving you the ability to monitor your infrastructure and applications with New Relic Alerts.

Requirements

To use the Amazon CloudFormation integration, ensure your system meets these requirements:

Install the CloudFormation integration

To install the CloudFormation integration:

  1. Navigate to the New Relic CloudFormation Partner Integration GitHub repository.
  2. From the repository page, clone or download the repository.

Register the resource provider

To use private resource providers you must first register them with CloudFormation, in the accounts and regions in which you want to use them. Once you're registered a resource provider, it will appear in the CloudFormation registry for that account and region, and you can use it in your stack templates.

You can register the resource provider using one of the following methods:

Configure the resource provider

Once you have registered the resource, add the NewRelic::Alerts::NrqlAlert resource to the JSON or YAML file for your CloudFormation stack, using the following properties to configure the alert condition. For an example configuration, see the Lambda CloudFormation resource examples.

Properties

Description

Type

ApiKey

The New Relic REST API key.

Required.

string

PolicyId

The unique ID for the alert policy's account ID associated with the condition; for example, 1234567890.

Required.

integer

Condition

Name

The name of the alerting condition.

string

RunbookUrl

Link to runbook for resolving this error.

string

Enabled

The status of your alert condition. true if the alert is active. Default: false

boolean

ExpectedGroups

This is the number of groups you expect to see at any given time. It is used in combination with the ignore_overlap option.

integer

IgnoreOverlap

If disabled, New Relic looks for a convergence of groups. If the condition is looking for 2 or more groups, and the returned values cannot be separated into that number of distinct groups, then that will also produce a violation. This type of overlap event is represented on a chart by group bands touching.

boolean

ValueFunction

This is the value function used from the plugin metric, and be one of the following strings:

string

Terms

An array of key/value pairs that may include the following:

array

Nrql

The NRQL query being monitored by Alerts, must include both of the following:

string

Example configuration

Lambda CloudFormation resource examples:

Provision the Resource in a CloudFormation Stack

To use the resource provider to provision your stack and create an alert condition:

  1. Once you have added the resource provider to your CloudFormation template, run the following command in your terminal or command-line interface to provision the resource and create your CloudFormation stack:

    aws cloudformation create-stack --region us-west-2 \
    --template-body "file://stack.yaml" \
    --stack-name NewRelicAlert
  2. To view your alert, go to alerts.newrelic.com, select Alert policies > (selected policy) > Alert conditions.

What's next?

To learn more about using alerts:

その他のヘルプ

さらに支援が必要な場合は、これらのサポートと学習リソースを確認してください:

問題を作成するこのページを編集する
Copyright © 2020 New Relic Inc.