Grafana Cloud Loki
Configuring the Grafana Cloud Loki backend (Managed)
Getting Started
These instructions are for the Grafana Cloud managed Loki service. If you run a self hosted Loki instance, please follow the instructions on the Loki page.
You can use Grafana Cloud managed service as a backend for Odigos to store your logs, metrics, and traces. This page describes how to configure Odigos to use Grafana Cloud Loki as a logs backend.
All the connection details can be found at grafana.com under My Account
Then, under the “GRAFANA CLOUD” title, select your Grafana Stuck, browser to the “Loki” card and click “Send Logs”
Loki Labels
Read about setting grafana loki labels in the Loki page.
Configuring Destination Fields
- GRAFANA_CLOUD_LOKI_ENDPOINT
string
: Endpoint. The endpoint of your Grafana Cloud Loki instance- This field is required
- Example:
https://logs-prod-{REGION/SHARD}.grafana.net/loki/api/v1/push
- GRAFANA_CLOUD_LOKI_USERNAME
string
: Username. You can find the loki username in the “Grafana Data Source settings” section as “User” value. The username is a number.- This field is required
- Example:
1234567
- GRAFANA_CLOUD_LOKI_PASSWORD
string
: Password (Api Token). This field is refered to as “password” or “Grafana.com API Token” in the Grafana Cloud UI. You can manage tokens in your “Account Settings” page under the “SECURITY” section in the “Access Policies” page. Make sure your token scope includeslogs:write
scope- This field is required
- Example:
glc_eyJvIj...
- GRAFANA_CLOUD_LOKI_LABELS
string[]
: Labels. Use these OpenTelemetry resource attributes as Loki labels for each log record- This field is optional and defaults to
["k8s.container.name", "k8s.pod.name", "k8s.namespace.name"]
- This field is optional and defaults to
Adding Destination to Odigos
There are two primary methods for configuring destinations in Odigos:
Using the UI
Use the Odigos CLI to access the UI
Click on Add Destination
, select Grafana Cloud Loki
and follow the on-screen instructions
Using Kubernetes manifests
Save the YAML below to a file (e.g. grafanacloudloki.yaml
)
Apply the YAML using kubectl