RousselTMLEARNING

TP · Datadog: from discovery to expertise

Final Lab: Monitors and SLOs in Terraform

What you will learn in this TP
  • Configure the Terraform provider
  • Write monitors and SLOs
  • Test triggering

Introduction #

What you will learn in this section
  • Configure the Terraform provider
  • Write monitors and SLOs
  • Test triggering

Context. Hand-made monitors keep multiplying with no review and no history. You move to managing them as code.

Prerequisites: Lab 4 completed, Terraform, Datadog application key  ·  Estimated time: 50 min

A reviewed, versioned Datadog configuration.

Hands-on #

Guided steps, with their solutions.

  1. 1. Configure the provider

    Why? Keys go through the environment, never into the code.

    Create an application key, export the variables and initialise the project.
  2. 2. APM latency monitor

    Why? One monitor per service, on a trace metric.

    Add a monitor on the p95 latency of paiement-api.
  3. 3. Log monitor and SLO

    Why? Error logs and an availability objective complete the setup.

    Add a log monitor (more than 20 errors in 5 min) and a metric-based SLO at 95% over 7 days.
  4. 4. Apply

    Why? The plan shows exactly what will be created: that is what gets reviewed in a pull request.

    Run terraform plan then terraform apply, and find the objects in the UI.
  5. 5. Trigger

    Why? Validate the chain before relying on it.

    Generate 500 requests against the API and watch the state of the monitors and the SLO.

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

My progress

  • ⏱ Estimated time : ≈ 50 min

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

💬 Recent discussions about this course

Ask a question about this lesson →See all discussions about this course

Recommended Articles

Monitors, SLOs, dashboards and Datadog as code

Create effective monitors (metrics, logs, APM, composites, anomalies), SLOs, dashboards, and mana...

Datadog best practices: tags, costs, alerts and governance

Checklist for using Datadog effectively: unified tagging, cost control (hosts, logs, custom metri...

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

Managing SLOs with Pyrra

Pyrra: define availability and latency SLOs as Kubernetes CRDs or files, generate Prometheus rule...

Generating Prometheus SLOs with Sloth

Describe an SLO in a few lines with Sloth and automatically generate multi-window recording rules...

Chaos engineering: principles, tools and practice with SLOs

A complete guide to chaos engineering: principles, steady state and hypothesis, blast radius, lin...

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

Testing and securing Terraform: validate, terraform test, tflint, Checkov and policies

Ensure the quality of Terraform code: fmt and validate, native terraform test tests with mocked p...

Infrastructure as Code on Azure: Bicep, Terraform, Cost Management and Well-Architected

Describe and deploy Azure as code with Bicep (modules, parameters, what-if, pipeline deployments)...

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!