[Chore]: Upgrade Loki 2.9.0 to 3.6.1 #98

Closed
opened 2026-02-05 23:36:03 +00:00 by egullickson · 1 comment
Owner

Parent Issue

Relates to #95

Summary

Upgrade Loki from 2.9.0 to 3.6.1. This is a major version upgrade requiring schema and storage configuration changes.

Key decision: Since this is a fresh logging stack (deployed Feb 2026) with no historical data worth preserving, perform a clean cutover to tsdb + v13 schema.

Files to Modify

1. docker-compose.yml (line 269)

Update image version:

# Before
image: ${REGISTRY_MIRRORS:-git.motovaultpro.com/egullickson/mirrors}/grafana/loki:2.9.0
# After
image: ${REGISTRY_MIRRORS:-git.motovaultpro.com/egullickson/mirrors}/grafana/loki:3.6.1

2. config/loki/config.yml

Full configuration migration needed:

Current (v2.9.0):

  • Schema: v11
  • Store: boltdb-shipper
  • Object store: filesystem
  • Index prefix: index_, period: 24h
  • Retention: 720h (30 days)

Target (v3.6.1):

  • Schema: v13
  • Store: tsdb
  • Object store: filesystem
  • Index prefix: index_, period: 24h
  • Retention: 720h (30 days)
  • allow_structured_metadata: false (not needed with v13)

Key changes:

# schema_config section
schema_config:
  configs:
    - from: 2020-01-01
      store: tsdb          # was: boltdb-shipper
      object_store: filesystem
      schema: v13          # was: v11
      index:
        prefix: index_
        period: 24h

# storage_config section - remove boltdb-shipper paths, add tsdb paths
storage_config:
  tsdb_shipper:
    active_index_directory: /loki/tsdb-index
    cache_location: /loki/tsdb-cache
  filesystem:
    directory: /loki/chunks

Breaking changes to handle:

  • service_name label auto-assigned on all ingested logs (review label limits)
  • Default label limit reduced from 30 to 15
  • Remove old boltdb-shipper storage directories from config

Acceptance Criteria

  • Loki starts without errors on v3.6.1
  • Loki config uses tsdb + v13 schema
  • Log pushes from Alloy accepted successfully
  • 30-day retention policy preserved
  • Loki healthcheck passes (/ready endpoint)

Dependencies

  • Blocked by: Mirror script update (sub-issue 1)
  • Should be done alongside or after Alloy migration (sub-issue 2)
  • Independent of: Grafana upgrade, Python upgrade
## Parent Issue Relates to #95 ## Summary Upgrade Loki from 2.9.0 to 3.6.1. This is a major version upgrade requiring schema and storage configuration changes. **Key decision**: Since this is a fresh logging stack (deployed Feb 2026) with no historical data worth preserving, perform a clean cutover to `tsdb` + `v13` schema. ## Files to Modify ### 1. `docker-compose.yml` (line 269) Update image version: ```yaml # Before image: ${REGISTRY_MIRRORS:-git.motovaultpro.com/egullickson/mirrors}/grafana/loki:2.9.0 # After image: ${REGISTRY_MIRRORS:-git.motovaultpro.com/egullickson/mirrors}/grafana/loki:3.6.1 ``` ### 2. `config/loki/config.yml` Full configuration migration needed: **Current (v2.9.0)**: - Schema: v11 - Store: boltdb-shipper - Object store: filesystem - Index prefix: `index_`, period: `24h` - Retention: 720h (30 days) **Target (v3.6.1)**: - Schema: v13 - Store: tsdb - Object store: filesystem - Index prefix: `index_`, period: `24h` - Retention: 720h (30 days) - `allow_structured_metadata: false` (not needed with v13) Key changes: ```yaml # schema_config section schema_config: configs: - from: 2020-01-01 store: tsdb # was: boltdb-shipper object_store: filesystem schema: v13 # was: v11 index: prefix: index_ period: 24h # storage_config section - remove boltdb-shipper paths, add tsdb paths storage_config: tsdb_shipper: active_index_directory: /loki/tsdb-index cache_location: /loki/tsdb-cache filesystem: directory: /loki/chunks ``` **Breaking changes to handle**: - `service_name` label auto-assigned on all ingested logs (review label limits) - Default label limit reduced from 30 to 15 - Remove old `boltdb-shipper` storage directories from config ## Acceptance Criteria - [ ] Loki starts without errors on v3.6.1 - [ ] Loki config uses tsdb + v13 schema - [ ] Log pushes from Alloy accepted successfully - [ ] 30-day retention policy preserved - [ ] Loki healthcheck passes (`/ready` endpoint) ## Dependencies - Blocked by: Mirror script update (sub-issue 1) - Should be done alongside or after Alloy migration (sub-issue 2) - Independent of: Grafana upgrade, Python upgrade
egullickson added the
status
backlog
type
chore
labels 2026-02-05 23:36:33 +00:00
egullickson added
status
in-progress
and removed
status
backlog
labels 2026-02-06 01:23:44 +00:00
Author
Owner

Milestone: Loki 3.6.1 Upgrade Complete

Phase: Execution | Agent: Platform | Status: PASS

Changes Made

docker-compose.yml

  • Updated Loki image: grafana/loki:2.9.0 -> grafana/loki:3.6.1

config/loki/config.yml

  • Schema: v11 -> v13
  • Store: boltdb-shipper -> tsdb
  • Storage: replaced boltdb_shipper paths with tsdb_shipper (new index/cache directories)
  • Removed deprecated shared_store: filesystem from both storage_config and compactor (removed in Loki 3.0)
  • Added allow_structured_metadata: false (not needed for current setup)
  • Preserved 30-day retention policy (720h)

Breaking Changes Handled

  • shared_store removed (Loki 3.0 breaking change)
  • Default label limit reduced from 30 to 15 (acceptable for our setup)
  • service_name label auto-assigned on ingestion (no action needed)

Commit

fc2dc21 - chore: upgrade Loki 2.9.0 to 3.6.1 with tsdb/v13 schema (refs #98)

Added to existing PR #102.

Verdict: PASS | Next: Production validation after merge

## Milestone: Loki 3.6.1 Upgrade Complete **Phase**: Execution | **Agent**: Platform | **Status**: PASS ### Changes Made **docker-compose.yml** - Updated Loki image: `grafana/loki:2.9.0` -> `grafana/loki:3.6.1` **config/loki/config.yml** - Schema: `v11` -> `v13` - Store: `boltdb-shipper` -> `tsdb` - Storage: replaced `boltdb_shipper` paths with `tsdb_shipper` (new index/cache directories) - Removed deprecated `shared_store: filesystem` from both `storage_config` and `compactor` (removed in Loki 3.0) - Added `allow_structured_metadata: false` (not needed for current setup) - Preserved 30-day retention policy (`720h`) ### Breaking Changes Handled - `shared_store` removed (Loki 3.0 breaking change) - Default label limit reduced from 30 to 15 (acceptable for our setup) - `service_name` label auto-assigned on ingestion (no action needed) ### Commit `fc2dc21` - `chore: upgrade Loki 2.9.0 to 3.6.1 with tsdb/v13 schema (refs #98)` Added to existing PR #102. *Verdict*: PASS | *Next*: Production validation after merge
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: egullickson/motovaultpro#98