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. 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. APM latency monitor
Why? One monitor per service, on a trace metric.
Add a monitor on the p95 latency ofpaiement-api.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. Apply
Why? The plan shows exactly what will be created: that is what gets reviewed in a pull request.
Runterraform planthenterraform apply, and find the objects in the UI.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
Sign in to track your progress and take notes. Sign in
💬 Recent discussions about this course
- Datadog : relier traces, logs et métriques du même service✓ solved · 1 reply(ies)
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)...