What you will learn in this TP
- Mask with VRL
- Write unit tests
- Automate in CI
Introduction #
What you will learn in this section
- Mask with VRL
- Write unit tests
- Automate in CI
Context. A GDPR audit found customer e-mail addresses in the logs. You add masking and tests that prevent any regression.
Prerequisites: previous lab completed · Estimated time: 40 min
A log pipeline tested like code.Setup #
Guided steps, with their solutions.
1. Write the masking
Why? Masking in the collector protects every destination at once.
Add amasquagetransformation afterparsethat masks e-mail addresses and tokens inmessageand removesauthorization.2. Write the tests
Why? One test per rule: if someone changes the regex, the CI flags it.
Add atestssection that injects a message containing an e-mail address and a token and checks that they have disappeared.3. Run the tests
Why? Tests run without starting a pipeline.
Runvector testwith the Docker image. Deliberately break the regex and run it again.4. Automate
Why? CI guarantees that every configuration change is validated and tested.
Write a CI job that runsvector validate --no-environmentthenvector test.
Difficulty level : ●●●○○ (3/5)
My progress
Sign in to track your progress and take notes. Sign in
Recommended Articles
Transformer avec VRL et tester ses pipelines Vector
Le langage VRL (Vector Remap Language) : analyse de logs (JSON, regex, syslog), gestion des erreu...
Bonnes pratiques de collecte de logs avec Fluent Bit et Vector
Check-list de production pour la collecte de logs : structure, filtrage à la source, masquage, ta...
Understanding the concept of score
The concept of score allows Elasticsearch to rank your documents by relevance during a search.
Understanding the Elastic Common Schema (ECS)
As always in our consulting engagements, we recommend that companies harmonise and standardise: k...
License consumption types
Understand the evolution of billing in Dynatrace: the difference between the old licensing model ...
Grafana Alloy: The importance of Self-Monitoring
Discover why and how to configure Grafana Alloy so that it monitors itself, collecting its own lo...
Grafana Alloy: Understanding and exploiting the User Interface (UI)
Discover how to enable, secure, and use Grafana Alloy's built-in web interface to visualize your ...
Grafana Alloy: Introduction and Architecture
Discover the fundamental concepts of Grafana Alloy, the transition from the static Agent to Alloy...
Grafana Alloy: Syntax and Configuration (Alloy Language: River)
As part of a Grafana training or observability training, master the declarative syntax of Grafana...