What you will learn in this TP
- Create a grok pipeline
- Create facets and generated metrics
- Add an exclusion filter
Introduction #
What you will learn in this section
- Create a grok pipeline
- Create facets and generated metrics
- Add an exclusion filter
Context. An application's logs arrive as raw text and are expensive to index. You make them usable and reduce their cost.
Prerequisites: Lab 1 completed · Estimated time: 45 min
Useful logs at a lower cost.Hands-on #
Guided steps, with their solutions.
1. Produce logs
Why? A container that writes lines in a known format, including errors.
Start a log generator taggedservice:paiement.2. Create the pipeline
Why? The grok parser turns the line into filterable attributes.
In Logs > Pipelines, create a pipeline filtered onsource:paiementwith a grok parser, then a status remapper on theniveauattribute.3. Facets and measure
Why? A facet filters, a measure aggregates.
Create a facet on@resultatand a measure on@montant, then display the sum of declined amounts per minute in the explorer.4. Generated metric
Why? A generated metric keeps working even for non-indexed logs.
Create apaiement.refusmetric (Generate Metrics) that counts@resultat:refuselogs, grouped by@motif.5. Exclusion filter
Why? Accepted payments are numerous and rarely looked at.
In the main index, add an exclusion filter that indexes only 10% ofservice:paiement @resultat:acceptelogs. Check the drop in indexed volume in Usage.
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
Logs in Datadog: collection, pipelines, indexes and volume control
Collect logs with the agent, structure them with pipelines and processors (grok), use facets and ...
Advanced Datadog logs: indexes, exclusion filters, Flex Logs, archives and Sensitive Data Scanner
Control the cost and compliance of Datadog logs: pipelines and processors, indexes and retention,...
Fluent Bit: parsers and filters, structuring and transforming logs
Structure and transform logs in Fluent Bit: parsers (json, regex, logfmt, ltsv), multiline parser...
Datadog APM and OpenTelemetry: traces, services and correlation with logs
Instrument applications for Datadog APM (dd-trace, single step instrumentation, OpenTelemetry), u...
Datadog costs and governance: usage, attribution, RBAC and tag policies
Control the bill and govern Datadog: tracking usage and estimates, cost attribution per team, usa...
Datadog best practices: tags, costs, alerts and governance
Checklist for using Datadog effectively: unified tagging, cost control (hosts, logs, custom metri...
Grafana Alloy: Log Management with Loki
Discover how to configure Grafana Alloy to read log files, journald, or network streams, process ...
Advanced Datadog APM: sampling, retention, profiler and Software Catalog
Go further with Datadog APM: ingestion control and sampling, retention filters, trace metrics, Co...
Monitors, SLOs, dashboards and Datadog as code
Create effective monitors (metrics, logs, APM, composites, anomalies), SLOs, dashboards, and mana...