RousselTMLEARNING

TP · New Relic: from discovery to expertise

Final lab: Alerts, workflow and SLO in Terraform

What you will learn in this TP
  • Describe alerts and SLOs in Terraform
  • Configure thresholds, window and loss of signal
  • Route an issue to a destination with a workflow
  • Test an alert end to end
Mode :

All steps and instructions are shown. Recommended for this lab: autonomous

Introduction #

Context. The shop goes to production. The team requires alerts and the SLO to be reviewed and versioned like code: you describe them in Terraform, then prove the alert really arrives.

Prerequisites: a free New Relic account (license key), a machine with Docker, curl and jq, the Lab 1 application running, Terraform 1.6 or later  ·  Estimated time: 60 min

An alert policy, an error rate condition, a workflow to your e-mail and an availability SLO, created and destroyed by Terraform, with a notification received.

Setup #

Guided steps, with their solution.

  1. 1. Prepare Terraform

    Why? The provider acts with a user key, not with the license key which only sends data.

    Create a USER key, export NEW_RELIC_API_KEY, NEW_RELIC_ACCOUNT_ID and NEW_RELIC_REGION, write main.tf and run terraform plan. How many resources will be created?
  2. 2. Understand the condition

    Why? Each setting changes when on-call gets woken up: you must be able to justify it.

    Explain threshold_occurrences = "all", aggregation_delay and the three expiration_* settings. Why open an incident on expiration?
  3. 3. Apply

    Why? Applying from code guarantees production and the Git repository are identical.

    Apply the configuration with your address, then find the policy, the workflow and the SLO in the UI.
  4. 4. Trigger the alert

    Why? An alert that was never tested is an alert nobody knows works.

    For 8 minutes, send orders whose number is a multiple of 17 (all failing), follow the incident then the issue, and check the e-mail arrives.
  5. 5. Read the SLO and destroy

    Why? The error budget shows the incident's effect on the promised reliability; destroying avoids orphan alerts.

    Open Service levels: what share of the weekly error budget did the incident consume? Then destroy every resource and stop the containers.

Validate your work

Check that each goal above is reached and that you get the result described in the introduction.

Difficulty level : ●●●●○ (4/5)

My progress

  • ⏱ Estimated time : ≈ 1 h

Sign in to track your progress and take notes. Sign in

⭐ Rate this lesson

5.0 initial rating from the teaching team

Sign in to rate this lesson →

💬 Questions about this lesson

No questions yet: be the first to ask for help or share your configuration.

Ask a question about this lesson →

Recommended Articles

Alerts, connectors and SLOs in Kibana

Create alert rules in Kibana (Elasticsearch query, ES|QL, custom threshold, logs), configure conn...

New Relic dashboards: building, sharing and analysing

Building useful dashboards in New Relic: NRQL widgets, chart choice, template variables, facet li...

Site Reliability Guardian in Dynatrace

Validating each release with Site Reliability Guardian (SRG): guardians and DQL objectives, fixed...

XLA: why user experience is the new standard of observability

Discover the concept of XLAs (Experience Level Agreements), how they differ from traditional SLAs...

Time-based vs event-based SLO: understanding, computing and choosing (with the Qonto example)

Differences between time-based SLOs (time slices, uptime) and event-based SLOs (good events over ...

Alerts and pipelines in OpenObserve

Create a template, a destination and an alert, avoid the SSRF webhook block and process data with...

Incidents and automation with Datadog: On-Call, Incident Management and Workflow Automation

Manage incidents in Datadog: well-designed monitors, on-call with On-Call, declaring and tracking...

Alerting on error budget burn rate (multi-window burn rate)

Why alert on burn rate rather than a threshold, and how to build the multi-window, multi-burn-rat...

SLOs in Dynatrace: objectives, error budget and burn rate

SLI, SLO and SLA, error budget and burn rate: defining an availability or performance SLO in Dyna...

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!