Send logs to Grafana Cloud using Alloy
Welcome to the Grafana learning journey that provides the best practice for configuring Alloy to send logs to Loki in Grafana Cloud.
Grafana Alloy is a flexible, high-performance, vendor-neutral distribution of the OpenTelemetry Collector. It’s fully compatible with the most popular open source observability standards such as OpenTelemetry and Prometheus.
Grafana Loki is a horizontally scalable, highly available, multi-tenant log aggregation system inspired by Prometheus. Because it indexes a set of labels instead of indexing the contents of the logs, Loki is cost-effective and easy to operate.
In simpler terms, Alloy is a data collector that gathers metrics, logs, traces, and profiles from your systems, while Loki is a log storage and search system, capable of storing logs and allowing you to explore them with queries.
The following image shows system logs collected by Alloy and forwarded to Loki.
This journey teaches you how to get started with Alloy to collect and ship logs on non-Kubernetes platforms to Loki. This enables you to query, drill down, and visualize logs in Grafana.
Here’s what to expect
When you complete this journey, you’ll be able to:
- Understand the value of observability and the advantages of Alloy
- Install Alloy on your machine
- Configure Alloy to send logs to Loki
- Use Alloy to understand and troubleshoot your telemetry pipelines
- Verify that logs appear in Grafana Logs Drilldown
Troubleshooting
If you get stuck, we’ve got your back! Where appropriate, troubleshooting information is just a click away.
More to explore
We understand you might want to explore other capabilities not strictly on this path. We’ll provide you opportunities where it makes sense.
Before you begin
Before you send logs to Loki with Alloy, ensure that you have:
- A Grafana Cloud account. To create an account, refer to Grafana Cloud.
- Access to your system logs that does not contain private information. If you don’t have existing logs, create a file with some log content.
- Basic familiarity with Prometheus, PromQL, Loki, LogQL, and basic Grafana navigation.
- Loki up and running and connected as a data source, whether it’s locally installed or using Grafana Cloud Logs, provided by Grafana Cloud.