---
title: Deploy Grafana Loki with AI on Blossom
url: "/deploy/grafana-loki/"
canonical_url: https://blossom88.com/deploy/grafana-loki/
markdown_url: https://blossom88.com/deploy/grafana-loki.md
summary: Keep application logs on a Blossom Volume and search them in Grafana Explore
  with LogQL.
categories:
- deployment
- logs
- monitoring
stack:
- Go
- LogQL
- Grafana
---

# Deploy Grafana Loki with AI on Blossom

[Grafana Loki](https://grafana.com/oss/loki/) stores logs from your apps
and infrastructure. Use LogQL in Grafana Explore to filter by labels and
find the lines for a specific request.

![Grafana Explore showing three log lines for a sample checkout request.](/deploy/assets/images/grafana-loki/checkout-logs.webp)

## Ask Your Agent

> **Ask your AI agent:** Deploy Grafana Loki on Blossom and help me find a slow request in a sample log.
>
> Follow this guide: https://blossom88.com/deploy/grafana-loki/

[Install the Blossom CLI and skill](https://docs.blossom88.com/learn/getting-started/install/) on your agent's machine and choose a Blossom Cloud Location when you log in. You can also use [Blossom BYOC (bring your own cloud)](https://docs.blossom88.com/learn/getting-started/choose-your-cloud/#blossom-byoc).

## Find a Request in Your Logs

Send a few sample checkout logs to Loki. In Grafana Explore, filter for the
checkout Service and search for the request ID.

<details class="optional-reading" markdown="1">
<summary>Deployment setup and commands</summary>

Use the [single-binary Loki image](https://grafana.com/docs/loki/latest/setup/install/docker/)
on one private Persistent Service. Mount a Volume at `/loki` for the
filesystem store and write-ahead log. Use the image's local configuration,
set `-ingester.wal-dir=/loki/wal`, and check `/ready` on port 3100.

Run Grafana as a separate Service guarded by Blossom Account access. Provision
a Loki data source with Grafana's server-side proxy and point it at Loki's
private Service address. Send logs through that private address from your
collector or an ad hoc Job. The Volume keeps Loki's logs across deploys.
Persist Grafana's own data separately if you want to save dashboard edits
made in the browser.

    blossom profile:show
    blossom app:create --data app.yml
    blossom environment:create --data environment.yml
    blossom service:create --data loki.yml
    blossom service:create --data grafana.yml
    blossom environment:deploy --id environment-100 --follow

</details>

## What You Get

- A private Loki endpoint for log ingestion and queries
- Grafana Explore connected to a persistent log store
