Update loki to 3.0.0 and switch to tsdb

This commit is contained in:
Daniel Berteaud 2024-04-08 22:44:10 +02:00
parent 1d0d6e07b1
commit 511470492c
5 changed files with 23 additions and 25 deletions

View File

@ -1,6 +1,6 @@
FROM danielberteaud/alpine:24.4-1 AS builder
ARG LOKI_VERSION=2.9.6
ARG LOKI_VERSION=3.0.0
ADD https://github.com/grafana/loki/releases/download/v${LOKI_VERSION}/loki-linux-amd64.zip /tmp
ADD https://github.com/grafana/loki/releases/download/v${LOKI_VERSION}/SHA256SUMS /tmp

View File

@ -31,10 +31,12 @@ job "monitoring-agent" {
}
volume "data" {
source = "vector_data"
type = "host"
}
volume "nomad" {
source = "nomad_alloc"
type = "host"
@ -432,6 +434,7 @@ _EOT
}
volume "host" {
source = "host_root"
type = "host"

View File

@ -19,6 +19,7 @@ job "monitoring-services" {
}
volume "data" {
source = "prometheus-data"
type = "csi"
@ -1474,6 +1475,7 @@ _EOT
}
volume "data" {
source = "alertmanager-data"
type = "csi"
@ -1857,6 +1859,7 @@ _EOT
}
volume "data" {
source = "loki-data"
type = "csi"
@ -2013,7 +2016,7 @@ _EOT
driver = "docker"
config {
image = "danielberteaud/loki:2.9.6-1"
image = "danielberteaud/loki:3.0.0-1"
command = "loki"
args = ["--config.file=/local/loki.yml"]
}
@ -2058,9 +2061,8 @@ common:
rules_directory: /data/rules
compactor:
compaction_interval: 1h
deletion_mode: filter-and-delete
delete_request_store: filesystem
retention_enabled: true
shared_store: filesystem
working_directory: /data/compactor
ingester:
chunk_idle_period: 1h
@ -2081,9 +2083,6 @@ ruler:
enable_alertmanager_discovery: true
enable_alertmanager_v2: true
enable_api: true
ring:
kvstore:
store: inmemory
rule_path: /tmp/loki-rules
storage:
local:
@ -2096,18 +2095,17 @@ schema_config:
period: 24h
prefix: index_
object_store: filesystem
schema: v11
store: boltdb-shipper
schema: v13
store: tsdb
server:
grpc_listen_address: 127.0.0.1
grpc_listen_port: 9095
http_listen_address: 127.0.0.1
http_listen_port: 3100
storage_config:
boltdb_shipper:
active_index_directory: /data/index
cache_location: /data/boltdb-cache
shared_store: filesystem
tsdb_shipper:
active_index_directory: /data/tsdb-index
cache_location: /data/tsdb-cache
_EOT
destination = "local/loki.yml"
@ -2383,6 +2381,7 @@ _EOT
}
volume "data" {
source = "grafana-data"
type = "csi"

View File

@ -20,27 +20,26 @@ common:
store: inmemory
storage_config:
boltdb_shipper:
active_index_directory: /data/index
cache_location: /data/boltdb-cache
shared_store: filesystem
tsdb_shipper:
active_index_directory: /data/tsdb-index
cache_location: /data/tsdb-cache
schema_config:
configs:
- from: '2020-10-24'
store: boltdb-shipper
store: tsdb
object_store: filesystem
schema: v11
schema: v13
index:
prefix: index_
period: 24h
compactor:
working_directory: /data/compactor
shared_store: filesystem
#shared_store: filesystem
delete_request_store: filesystem
compaction_interval: 1h
retention_enabled: true
deletion_mode: filter-and-delete
ingester:
chunk_idle_period: 1h
@ -68,9 +67,6 @@ ruler:
type: local
local:
directory: /local/rules
ring:
kvstore:
store: inmemory
analytics:
reporting_enabled: false

View File

@ -241,7 +241,7 @@ monitoring:
# Loki is the log server
loki:
# Version of loki
version: 2.9.6
version: 3.0.0
# Docker image to use
image: '[[ .docker.repo ]]loki:[[ .monitoring.loki.version ]]-1'
# Custom env to set in the container