Compare commits
73
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e5c3bdb1ca
|
||
|
|
66ac4c577c
|
||
|
|
ed286e2cee
|
||
|
|
0e711c86f5 | ||
|
|
335589ee0e
|
||
|
|
8fbd4c4e93
|
||
|
|
faaf18c74c
|
||
|
|
69077eaefd
|
||
|
|
b8baea9cfc
|
||
|
|
c92dd89b4c
|
||
|
|
8de8bc9008
|
||
|
|
d7bb30d346
|
||
|
|
5a10a45ced
|
||
|
|
9211b98cc1
|
||
|
|
f9820da529
|
||
|
|
48888a1fe9
|
||
|
|
b240c5273b
|
||
|
|
53e03e12a4
|
||
|
|
be30a8a4fd
|
||
|
|
627d988902
|
||
|
|
7043f3e1b1
|
||
|
|
e75fa4487c
|
||
|
|
ac95f68b01
|
||
|
|
5f3f9c957c
|
||
|
|
7818c89ad7
|
||
|
|
5dc27b4a0b
|
||
|
|
36ef86e8b7
|
||
|
|
1581ae6430
|
||
|
|
b47f1b021f
|
||
|
|
c6efc69859
|
||
|
|
6c529f3527
|
||
|
|
01b398ddea
|
||
|
|
30ad8e54f6
|
||
|
|
c9910eabf4
|
||
|
|
2972272303
|
||
|
|
4c69cf97ab
|
||
|
|
1110786179
|
||
|
|
1d9eb10004 | ||
|
|
23acf56637
|
||
|
|
03227f1907
|
||
|
|
d085c66d68
|
||
|
|
1970061ff8
|
||
|
|
fa76179987
|
||
|
|
64cb07a4a2
|
||
|
|
e247677433
|
||
|
|
f2310f2b86
|
||
|
|
f2711fa16e
|
||
|
|
2870b9486c
|
||
|
|
3a1fabe4f9
|
||
|
|
a358837922
|
||
|
|
dd0a0c1bb0
|
||
|
|
31cabc36ae
|
||
|
|
d25986d5cb
|
||
|
|
f8f8004445
|
||
|
|
aa05d022da
|
||
|
|
fb52a76247
|
||
|
|
2e2a52eae0
|
||
|
|
48419d5afa
|
||
|
|
a0a6e2c509
|
||
|
|
024f2a8aec
|
||
|
|
38095e23fa
|
||
|
|
641161329e
|
||
|
|
cdacfd035e
|
||
|
|
b2d3901f61
|
||
|
|
8becf1c1d6
|
||
|
|
777b1355dd
|
||
|
|
e83433cebd
|
||
|
|
a713f98ffb
|
||
|
|
8dc84c591c
|
||
|
|
d9aa05a4b5
|
||
|
|
349df12204
|
||
|
|
6c33089078
|
||
|
|
4bedebfab1
|
+7
-6
@@ -79,12 +79,6 @@ 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
|
||||
@@ -139,3 +133,10 @@ SECRET_BASIC_AUTH_VERSION=v1
|
||||
|
||||
# Node memory usage alert will trigger when memory usage is above the given number in percent
|
||||
#ALERT_NODE_MEMORY_USAGE=85
|
||||
|
||||
# Tell Traefik to keep access logs (could be very verbose). See Access
|
||||
# logs on Traefik recipe.
|
||||
#ALLOY_ACCESS_LOGS=true
|
||||
#PROMETHEUS_ACCESS_LOGS=true
|
||||
#LOKI_ACCESS_LOGS=true
|
||||
#GRAFANA_ACCESS_LOGS=true
|
||||
|
||||
@@ -130,18 +130,6 @@ $ 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:
|
||||
|
||||
@@ -5,12 +5,12 @@ 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=v4
|
||||
export LOKI_YML_VERSION=v3
|
||||
export PROMETHEUS_YML_VERSION=v2
|
||||
export MATRIX_ALERTMANAGER_CONFIG_VERSION=v1
|
||||
export MATRIX_ALERTMANAGER_ENTRYPOINT_VERSION=v1
|
||||
export GF_ALERTS_NODE_VERSION=v4
|
||||
export CONFIG_ALLOY_VERSION=v3
|
||||
export GF_ALERTS_NODE_VERSION=v3
|
||||
export CONFIG_ALLOY_VERSION=v11
|
||||
|
||||
# migrates secrets from old names to new names by reading values from the
|
||||
# running containers on the server and re-inserting them under the new names.
|
||||
|
||||
@@ -87,7 +87,7 @@ groups:
|
||||
datasourceUid: PBFA97CFB590B2093
|
||||
model:
|
||||
editorMode: code
|
||||
expr: 100 - ((node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes) * 100)
|
||||
expr: (node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes) * 100
|
||||
instant: true
|
||||
intervalMs: 1000
|
||||
legendFormat: __auto
|
||||
|
||||
@@ -14,3 +14,4 @@ services:
|
||||
- "traefik.http.routers.${STACK_NAME}-alloy.tls=true"
|
||||
- "traefik.http.routers.${STACK_NAME}-alloy.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
||||
- "traefik.http.routers.${STACK_NAME}-alloy.middlewares=basicauth@file"
|
||||
- "traefik.http.routers.${STACK_NAME}-alloy.observability.accesslogs=${ALLOY_ACCESS_LOGS:-false}"
|
||||
|
||||
+2
-1
@@ -39,10 +39,11 @@ services:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.swarm.network=proxy"
|
||||
- "traefik.http.services.${STACK_NAME}-grafana.loadbalancer.server.port=3000"
|
||||
- "traefik.http.routers.${STACK_NAME}-grafana.rule=Host(`${GRAFANA_DOMAIN:-$DOMAIN}`)"
|
||||
- "traefik.http.routers.${STACK_NAME}-grafana.rule=Host(`${DOMAIN}`)"
|
||||
- "traefik.http.routers.${STACK_NAME}-grafana.entrypoints=web-secure"
|
||||
- "traefik.http.routers.${STACK_NAME}-grafana.tls=true"
|
||||
- "traefik.http.routers.${STACK_NAME}-grafana.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
||||
- "traefik.http.routers.${STACK_NAME}-grafana.observability.accesslogs=${GRAFANA_ACCESS_LOGS:-false}"
|
||||
healthcheck:
|
||||
test: "wget -q http://localhost:3000/healthz -O/dev/null"
|
||||
interval: 5s
|
||||
|
||||
+1
-1
@@ -22,7 +22,6 @@ services:
|
||||
- STACK_NAME
|
||||
- LOKI_STORAGE_FILESYSTEM
|
||||
- LOKI_STORAGE_S3
|
||||
- LOKI_TSDB_FROM_DATE
|
||||
deploy:
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
@@ -35,6 +34,7 @@ services:
|
||||
- "traefik.http.routers.${STACK_NAME}-loki.tls=true"
|
||||
- "traefik.http.routers.${STACK_NAME}-loki.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
||||
- "traefik.http.routers.${STACK_NAME}-loki.middlewares=basicauth@file"
|
||||
- "traefik.http.routers.${STACK_NAME}-loki.observability.accesslogs=${LOKI_ACCESS_LOGS:-false}"
|
||||
|
||||
|
||||
configs:
|
||||
|
||||
@@ -38,6 +38,7 @@ services:
|
||||
- "traefik.http.routers.${STACK_NAME}-prometheus.tls=true"
|
||||
- "traefik.http.routers.${STACK_NAME}-prometheus.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
||||
- "traefik.http.routers.${STACK_NAME}-prometheus.middlewares=basicauth@file"
|
||||
- "traefik.http.routers.${STACK_NAME}-prometheus.observability.accesslogs=${PROMETHEUS_ACCESS_LOGS:-false}"
|
||||
|
||||
configs:
|
||||
prometheus_yml:
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
version: "3.8"
|
||||
services:
|
||||
smartctl:
|
||||
image: "prometheuscommunity/smartctl-exporter:v0.15.0"
|
||||
image: "prometheuscommunity/smartctl-exporter:v0.14.0"
|
||||
volumes:
|
||||
- "/var/lib/smartmontools/json:/debug"
|
||||
command:
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ services:
|
||||
condition: on-failure
|
||||
labels:
|
||||
- "backupbot.backup=${ENABLE_BACKUPS:-true}"
|
||||
- "coop-cloud.${STACK_NAME}.version=2.3.0+v1.20.1"
|
||||
- "coop-cloud.${STACK_NAME}.version=2.2.0+v1.18.1"
|
||||
configs:
|
||||
config_alloy:
|
||||
template_driver: golang
|
||||
|
||||
+1
-29
@@ -56,26 +56,12 @@ 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 }}
|
||||
@@ -88,15 +74,6 @@ 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:
|
||||
@@ -104,11 +81,6 @@ 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" }}
|
||||
@@ -127,7 +99,7 @@ storage_config:
|
||||
|
||||
|
||||
compactor:
|
||||
working_directory: /loki/compactor
|
||||
working_directory: /loki/boltdb-shipper-compactor
|
||||
compaction_interval: 10m
|
||||
retention_enabled: true
|
||||
retention_delete_delay: 2h
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
- opt-in migration of Loki's index store from deprecated boltdb-shipper to TSDB via LOKI_TSDB_FROM_DATE
|
||||
Reference in New Issue
Block a user