DevOps teams often use infrastructure-as-code (IaC) to provision, deploy, and manage applications in the cloud. AWS CloudFormation is one tool that provides IaC functionality, and AWS customers can now use third-party resource providers in their application stacks configured with CloudFormation.
In New Relic One, you can now create NRQL alert conditions as resources directly in CloudFormation templates.
At New Relic, we believe that observability is fundamental to building great software, and part of any successful observability practice is noticing when things go wrong. New Relic alerts allow you to flexibly create and configure alerting for your services and applications. Alert conditions describe when the behavior of a monitored service or application is considered a violation. For example, DevOps teams at New Relic use alert conditions to watch for increases in resource use that may require them to scale their infrastructure capacity.
In this post, we’ll execute an example CloudFormation template that creates an AWS Lambda function with a built-in New Relic alert condition resource type.
About AWS CloudFormation
In CloudFormation, you use templates written in JSON or YAML to express a high-level description of how your various AWS resources and the interactions between them form a "stack." An execution engine uses this template to build the stack using the resources you specified. Since this infrastructure is expressed as code, CloudFormation can build this stack again and again, and it will be the same every time.
AWS services typically have well-documented APIs. CloudFormation simply calls these APIs to create, delete, and update resources (all of which are described in terms of a resource type, a name, and a set of properties). When you tell CloudFormation to create your stack, the execution engine makes API calls to the AWS service APIs and supplies your resource properties as parameters to those calls. The translation layer between the stack and the API calls is the "resource provider."
Create or update New Relic One NRQL alerts from a CloudFormation stack
The newrelic-alerts-cloudformation experimental solution, published on New Relic Instant Observability and on GitHub in the newrelic-experimental repository, provides an AWS CloudFormation resource for creating or updating New Relic NRQL alerts from a CloudFormation stack. (Note: This project is provided as-is, without warranty of dedicated support. Report issues and contributions to the newrelic-alerts-cloudformation project on GitHub.)
To install, follow the installation instructions in the repository.
Próximos passos
Learn more about New Relic Instant Observability, an open ecosystem of free, pre-built quickstarts that help engineers start monitoring their stacks in minutes without manual setup.
Want to share your monitoring use case or best practices? New Relic Instant Observability is open source, so it’s easy to add to quickstarts or build a brand new one. Help drive the mission to democratize observability—and be featured as a quickstart author. Read the guide to building a quickstart.
As opiniões expressas neste blog são de responsabilidade do autor e não refletem necessariamente as opiniões da New Relic. Todas as soluções oferecidas pelo autor são específicas do ambiente e não fazem parte das soluções comerciais ou do suporte oferecido pela New Relic. Junte-se a nós exclusivamente no Explorers Hub ( discuss.newrelic.com ) para perguntas e suporte relacionados a esta postagem do blog. Este blog pode conter links para conteúdo de sites de terceiros. Ao fornecer esses links, a New Relic não adota, garante, aprova ou endossa as informações, visualizações ou produtos disponíveis em tais sites.