logging: add promtail + loki + grafana #190
2 changed files with 80 additions and 0 deletions
23
docker-compose/loki/docker-compose.yml.j2
Normal file
23
docker-compose/loki/docker-compose.yml.j2
Normal file
|
@ -0,0 +1,23 @@
|
|||
# https://github.com/DoTheEvo/selfhosted-apps-docker/tree/master/prometheus_grafana_loki#Loki
|
||||
services:
|
||||
loki:
|
||||
image: grafana/loki:v3.2.0
|
||||
container_name: loki
|
||||
restart: always
|
||||
volumes:
|
||||
- data:/loki
|
||||
- ./loki-config.yml:/etc/loki-config.yml
|
||||
command:
|
||||
- '-config.file=/etc/loki-config.yml'
|
||||
ports:
|
||||
- "3100:3100"
|
||||
# labels:
|
||||
# org.label-schema.group: "monitoring"
|
||||
|
||||
######## Networks ########
|
||||
networks:
|
||||
loki:
|
||||
|
||||
######## Volumes ########
|
||||
volumes:
|
||||
data:
|
57
docker-compose/loki/loki-config.yml.j2
Normal file
57
docker-compose/loki/loki-config.yml.j2
Normal file
|
@ -0,0 +1,57 @@
|
|||
# https://github.com/DoTheEvo/selfhosted-apps-docker/tree/master/prometheus_grafana_loki#Loki
|
||||
|
||||
auth_enabled: false
|
||||
|
||||
server:
|
||||
http_listen_port: 3100
|
||||
|
||||
common:
|
||||
instance_addr: 127.0.0.1
|
||||
path_prefix: /loki
|
||||
storage:
|
||||
filesystem:
|
||||
chunks_directory: /loki/chunks
|
||||
rules_directory: /loki/rules
|
||||
replication_factor: 1
|
||||
ring:
|
||||
kvstore:
|
||||
store: inmemory
|
||||
|
||||
# --- disable splitting to fix "too many outstanding requests"
|
||||
|
||||
query_range:
|
||||
parallelise_shardable_queries: false
|
||||
|
||||
# --- compactor to have control over length of data retention
|
||||
|
||||
compactor:
|
||||
working_directory: /loki/compactor
|
||||
compaction_interval: 10m
|
||||
retention_enabled: true
|
||||
retention_delete_delay: 2h
|
||||
retention_delete_worker_count: 150
|
||||
|
||||
limits_config:
|
||||
retention_period: 240h
|
||||
split_queries_by_interval: 0 # part of disable splitting fix
|
||||
|
||||
# -------------------------------------------------------
|
||||
|
||||
schema_config:
|
||||
configs:
|
||||
- from: 2020-10-24
|
||||
store: tsdb
|
||||
object_store: filesystem
|
||||
schema: v13
|
||||
index:
|
||||
prefix: index_
|
||||
period: 24h
|
||||
|
||||
# ruler:
|
||||
# alertmanager_url: http://alertmanager:9093
|
||||
|
||||
analytics:
|
||||
reporting_enabled: false
|
||||
|
||||
|
||||
# TODO alertmanager
|
Loading…
Reference in a new issue