Skip to content

Commit

Permalink
feat(loki): add v11 migration option
Browse files Browse the repository at this point in the history
  • Loading branch information
alesharik committed Jul 7, 2024
1 parent 0def1bb commit 627218b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion roles/loki/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ loki:
- selector: '{container_name="nginx-proxy"}'
priority: 1
period: 24h
migrate_from_v11: false # migrate from old v11 schema
migration_dates: # used to migrate old loki from v11 to v13
v11: "2020-10-24"
v13: "2024-07-08"
v13: "2024-07-06"
```
### Effects
Expand Down
3 changes: 2 additions & 1 deletion roles/loki/defaults/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ loki:
- selector: '{container_name="nginx-proxy"}'
priority: 1
period: 24h
migrate_from_v11: false
migration_dates:
v11: "2020-10-24"
v13: "2024-07-08"
v13: "2024-07-06"
2 changes: 2 additions & 0 deletions roles/loki/templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,15 @@ schema_config:
index:
prefix: index_
period: 24h
{% if loki.migrate_from_v11 %}
- from: '{{ loki.migration_dates.v13 }}'
store: tsdb
object_store: filesystem
schema: v13
index:
period: 24h
prefix: index_
{% endif %}

#ruler:
# alertmanager_url: http://localhost:9093
Expand Down

0 comments on commit 627218b

Please sign in to comment.