[TP] Lab: Logs Collection and Forwarding to Loki
What you will learn in this TP :
Introduction
The goal of this lab is to configure Grafana Alloy to read local log files, add context labels to them, and send everything to a Grafana Loki instance.Logs Pipeline
We will configure the blocks that make up the pipeline using the River language.-
1. Logs source
Add the configuration to discover and read the `/var/log/myapp/*.log` files. -
2. Logs processing
Add a processing block to dynamically add an `env=production` label to all collected log lines. -
3. Forwarding to Loki
Configure sending the logs to a Loki instance available at `http://localhost:3100`.
Recommended Articles
Understand the evolution of billing in Dynatrace: the difference between the ...
Discover why and how to configure Grafana Alloy so that it monitors itself, c...
Discover how to enable, secure, and use Grafana Alloy's built-in web interfac...
Discover the fundamental concepts of Grafana Alloy, the transition from the s...
As part of a Grafana training or observability training, master the declarati...
Learn how to configure Grafana Alloy to collect, transform, and forward metri...
Discover how to configure Grafana Alloy to read log files, journald, or netwo...
Dive into distributed trace processing. Learn how to ingest OTLP, Jaeger, or ...
Discover how to configure continuous profiling in your environments using Gra...
Learn how to manage large-scale Grafana Alloy deployments. Configure Clusteri...
Discover Grafana Assistant, the artificial intelligence integrated into Grafa...
Comparison between Grafana Alloy and Dynatrace ActiveGate. Understand the fun...
Course Glossary
An open-source, vendor-neutral telemetry collector designed to replace Grafana Agent, fully compatible with OpenTelemetry (OTel).