Compare commits

..
Author SHA1 Message Date
dannygroenewegen e708e418ba feat: opt-in Loki index store migration from deprecated boltdb-shipper to TSDB
boltdb-shipper is deprecated and will be removed in Loki 4.0.
Setting LOKI_TSDB_FROM_DATE adds a second schema_config period (store:
tsdb) from that date onward, alongside the existing boltdb-shipper
period, so logs before the cutover stay queryable under the old store
while new logs are indexed with TSDB.
2026-10-29 12:44:30 +01:00
fauno aa61e17bae fix(alert): invert memory usage alert (#48)
Reviewed-on: #48
Reviewed-by: fauno <fauno@sutty.coop.ar>
2026-10-13 13:55:45 +00:00
fauno 48e8318e41 chore: publish 2.3.0+v1.20.1 release 2026-10-12 13:11:16 -03:00
fauno 298efcfb50 Merge branch 'main' of https://git.coopcloud.tech/coop-cloud/monitoring-ng 2026-10-12 13:10:24 -03:00
fauno 4ab976a0f0 chore(deps): update prometheuscommunity/smartctl-exporter docker tag to v0.15.0 (#46)
Reviewed-on: #46
Reviewed-by: fauno <fauno@sutty.coop.ar>
2026-10-12 16:09:28 +00:00
fauno 8665af7d91 chore(deps): update grafana/grafana docker tag to v13.2.3 (#43)
Reviewed-on: #43
Reviewed-by: fauno <fauno@sutty.coop.ar>
2026-10-12 16:08:11 +00:00
renovate-bot 24927d6331 chore(deps): update grafana/grafana docker tag to v13.2.3 2026-10-12 16:07:57 +00:00
fauno 06521e98cf chore(deps): update grafana/alloy docker tag to v1.20.1 (#42)
Reviewed-on: #42
Reviewed-by: fauno <fauno@sutty.coop.ar>
2026-10-12 16:04:23 +00:00
fauno b322d8fb84 chore(deps): update prom/prometheus docker tag to v3.15.0 (#45)
Reviewed-on: #45
Reviewed-by: fauno <fauno@sutty.coop.ar>
2026-10-12 16:02:08 +00:00
p4u1 01111b992d fix(alert): invert memory usage alert 2026-10-12 13:02:52 +02:00
renovate-bot 0a749fe4fe chore(deps): update prometheuscommunity/smartctl-exporter docker tag to v0.15.0 2026-10-12 03:16:50 +00:00
renovate-bot f980185f8f chore(deps): update prom/prometheus docker tag to v3.15.0 2026-10-12 03:16:46 +00:00
renovate-bot 5028630b04 chore(deps): update grafana/alloy docker tag to v1.20.1 2026-10-12 01:16:59 +00:00
fauno e5028c8648 fix: monitoring-ng 2026-10-05 12:46:49 -03:00
12 changed files with 61 additions and 27 deletions
+6
View File
@@ -79,6 +79,12 @@ SECRET_BASIC_AUTH_VERSION=v1
# LOKI_RETENTION_PERIOD=744h
# LOKI_STORAGE_FILESYSTEM=1
#
# Opt in to migrating the deprecated boltdb-shipper index store to TSDB, from this date
# onward (YYYY-MM-DD). MUST be a FUTURE date, e.g. the day after you deploy this: a past
# or same-day date makes both stores claim that day's data, breaking queries for it.
# Logs from before this date are still ingested and queried from boltdb-shipper.
# LOKI_TSDB_FROM_DATE=2026-11-01
#
## S3 Storage
# LOKI_STORAGE_S3=1
# LOKI_AWS_ENDPOINT=https://minio.autonomic.zone
+12
View File
@@ -130,6 +130,18 @@ $ echo '{
$ systemctl restart docker.service
```
### Upgrading: Loki TSDB migration
Loki's index store defaults to `boltdb-shipper`, which is deprecated upstream in favour of
TSDB. To migrate an existing deployment without losing access to already-ingested logs, set
`LOKI_TSDB_FROM_DATE` in your `.env` (see `.env.sample`) to a date on or after the day after
your deploy, then `abra app deploy`. Logs from before that date stay on boltdb-shipper and
remain queryable as before; only logs from that date onward are indexed with TSDB.
**The date must be in the future when you deploy it, never today or earlier**: both stores share the same
per-day table, so a past or same-day date makes them collide over that day's data and
breaks querying it.
### Setup Push Gateway
1. Enable in the env file by uncommenting the following lines:
+3 -3
View File
@@ -5,11 +5,11 @@ export GF_STACKS_DASH_VERSION=v3
export GF_TRAEFIK_DASH_VERSION=v3
export GF_BACKUP_DASH_VERSION=v1
export GF_CUSTOM_INI_VERSION=v4
export LOKI_YML_VERSION=v3
export LOKI_YML_VERSION=v4
export PROMETHEUS_YML_VERSION=v2
export MATRIX_ALERTMANAGER_CONFIG_VERSION=v2
export MATRIX_ALERTMANAGER_CONFIG_VERSION=v1
export MATRIX_ALERTMANAGER_ENTRYPOINT_VERSION=v1
export GF_ALERTS_NODE_VERSION=v3
export GF_ALERTS_NODE_VERSION=v4
export CONFIG_ALLOY_VERSION=v3
# migrates secrets from old names to new names by reading values from the
+3 -17
View File
@@ -54,35 +54,21 @@ templating:
{{ else if .Alert.Labels.alertname }}
{{ .Alert.Labels.alertname }}
{{ end }}
{{ if .Alert.Labels.rulename }}
&rarr; <strong>{{ .Alert.Labels.rulename }}</strong>
{{ end }}
{{ if .Alert.Labels.grafana_folder }}
<em>({{ .Alert.Labels.grafana_folder }})</em>
{{ end }}
>>
{{ if .Alert.Labels.severity }}
{{ .Alert.Labels.severity | ToUpper }}:
{{ .Alert.Labels.severity | ToUpper }}:
{{ end }}
{{ if .Alert.Annotations.description }}
{{ .Alert.Annotations.description }}
{{ else if .Alert.Annotations.summary }}
{{ .Alert.Annotations.summary }}
{{ else if .Alert.Labels.rulename }}
Query {{ .Alert.Labels.ref_id }} returned no data (datasource {{ .Alert.Labels.datasource_uid }})
{{ end }}
{{ if .Alert.Labels.instance }}
on {{ .Alert.Labels.instance }}
{{ end }}
>>
{{ if .Alert.Annotations.runbook }}
<a href="{{ .Alert.Annotations.runbook }}">Runbook</a> |
<a href="{{ .Alert.Annotations.runbook }}">Runbook</a> |
{{ end }}
{{ if .Alert.Annotations.dashboard }}
<a href="{{ .Alert.Annotations.dashboard }}">Dashboard</a> |
{{ end }}
{{ if .GeneratorURL }}
<a href="{{ .GeneratorURL }}">Rule</a> |
<a href="{{ .Alert.Annotations.dashboard }}">Dashboard</a> |
{{ end }}
<a href="{{ .SilenceURL }}">Silence</a>
</p>`}}'
+1 -1
View File
@@ -87,7 +87,7 @@ groups:
datasourceUid: PBFA97CFB590B2093
model:
editorMode: code
expr: (node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes) * 100
expr: 100 - ((node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes) * 100)
instant: true
intervalMs: 1000
legendFormat: __auto
+1 -1
View File
@@ -2,7 +2,7 @@ version: '3.8'
services:
grafana:
image: grafana/grafana:13.0.6
image: grafana/grafana:13.2.3
volumes:
- grafana-data:/var/lib/grafana:rw
secrets:
+1
View File
@@ -22,6 +22,7 @@ services:
- STACK_NAME
- LOKI_STORAGE_FILESYSTEM
- LOKI_STORAGE_S3
- LOKI_TSDB_FROM_DATE
deploy:
restart_policy:
condition: on-failure
+1 -1
View File
@@ -2,7 +2,7 @@ version: '3.8'
services:
prometheus:
image: prom/prometheus:v3.12.0
image: prom/prometheus:v3.15.0
secrets:
- basic_auth
volumes:
+1 -1
View File
@@ -2,7 +2,7 @@
version: "3.8"
services:
smartctl:
image: "prometheuscommunity/smartctl-exporter:v0.14.0"
image: "prometheuscommunity/smartctl-exporter:v0.15.0"
volumes:
- "/var/lib/smartmontools/json:/debug"
command:
+2 -2
View File
@@ -3,7 +3,7 @@ version: "3.8"
services:
app:
image: grafana/alloy:v1.18.1
image: grafana/alloy:v1.20.1
hostname: "${DOMAIN}"
configs:
- source: config_alloy
@@ -53,7 +53,7 @@ services:
condition: on-failure
labels:
- "backupbot.backup=${ENABLE_BACKUPS:-true}"
- "coop-cloud.${STACK_NAME}.version=2.2.0+v1.18.1"
- "coop-cloud.${STACK_NAME}.version=2.3.0+v1.20.1"
configs:
config_alloy:
template_driver: golang
+29 -1
View File
@@ -56,12 +56,26 @@ schema_config:
index:
prefix: index_
period: 24h
{{ if env "LOKI_TSDB_FROM_DATE" }}
- from: {{ env "LOKI_TSDB_FROM_DATE" }}
store: tsdb
object_store: filesystem
schema: v13
index:
prefix: index_
period: 24h
{{ end }}
storage_config:
boltdb_shipper:
active_index_directory: /loki/boltdb-shipper-active
cache_location: /loki/boltdb-shipper-cache
cache_ttl: 24h # Can be increased for faster performance over longer query periods, uses more disk space
{{ if env "LOKI_TSDB_FROM_DATE" }}
tsdb_shipper:
active_index_directory: /loki/tsdb-index
cache_location: /loki/tsdb-cache
{{ end }}
filesystem:
directory: /loki/chunks
{{ end }}
@@ -74,6 +88,15 @@ schema_config:
index:
prefix: index_
period: 24h
{{ if env "LOKI_TSDB_FROM_DATE" }}
- from: {{ env "LOKI_TSDB_FROM_DATE" }}
store: tsdb
object_store: aws
schema: v13
index:
prefix: index_
period: 24h
{{ end }}
storage_config:
boltdb_shipper:
@@ -81,6 +104,11 @@ storage_config:
cache_location: /loki/index_cache
resync_interval: 5s
shared_store: aws
{{ if env "LOKI_TSDB_FROM_DATE" }}
tsdb_shipper:
active_index_directory: /loki/tsdb-index
cache_location: /loki/tsdb-cache
{{ end }}
aws:
endpoint: {{ env "LOKI_AWS_ENDPOINT" }}
@@ -99,7 +127,7 @@ storage_config:
compactor:
working_directory: /loki/boltdb-shipper-compactor
working_directory: /loki/compactor
compaction_interval: 10m
retention_enabled: true
retention_delete_delay: 2h
+1
View File
@@ -0,0 +1 @@
- opt-in migration of Loki's index store from deprecated boltdb-shipper to TSDB via LOKI_TSDB_FROM_DATE