Choose Alloy components

In Alloy, a component is a building block that does one specific job in collecting, processing, or sending telemetry data. It’s similar to a LEGO piece where each one has a specific purpose, and you connect them to build a working pipeline.

When choosing which components to use, plan out the pipeline you want to create first and visualize the flow of data. Once you have a rough guide, refer to the Alloy Components page for all the available components.

The following diagram shows the basic minimum components for sending system logs to Loki.

Diagram showing an example pipeline for sending logs to Loki with Alloy

  • local.file_match - This component searches for log files on your system based on a pattern (like /var/log/*.log).
  • loki.source_file - This component reads log lines from the files found by local.file_match. It parses the logs to prepare them for Loki.
  • loki.write - This component sends the processed logs to a Loki backend.

In the next milestone, you’re going to edit the Alloy configuration file to send logs to Loki.

More to explore (optional)

At this point in your journey, you can explore the following paths:

Components

Choose a Grafana Alloy component


page 5 of 9