|
|
@ -3,6 +3,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
- name: Set up Loki
|
|
|
|
- name: Set up Loki
|
|
|
|
hosts: lotus-land-story
|
|
|
|
hosts: lotus-land-story
|
|
|
|
|
|
|
|
vars:
|
|
|
|
|
|
|
|
version: 2.8.0
|
|
|
|
tasks:
|
|
|
|
tasks:
|
|
|
|
|
|
|
|
|
|
|
|
- name: Provision Grafana
|
|
|
|
- name: Provision Grafana
|
|
|
@ -48,6 +50,7 @@
|
|
|
|
store: inmemory
|
|
|
|
store: inmemory
|
|
|
|
compactor:
|
|
|
|
compactor:
|
|
|
|
retention_enabled: true
|
|
|
|
retention_enabled: true
|
|
|
|
|
|
|
|
# delete_request_store: filesystem
|
|
|
|
limits_config:
|
|
|
|
limits_config:
|
|
|
|
retention_period: 168h
|
|
|
|
retention_period: 168h
|
|
|
|
schema_config:
|
|
|
|
schema_config:
|
|
|
@ -69,6 +72,15 @@
|
|
|
|
schema: v12
|
|
|
|
schema: v12
|
|
|
|
store: tsdb
|
|
|
|
store: tsdb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# https://grafana.com/docs/loki/latest/operations/storage/tsdb/
|
|
|
|
|
|
|
|
- from: 2024-09-27
|
|
|
|
|
|
|
|
index:
|
|
|
|
|
|
|
|
period: 24h
|
|
|
|
|
|
|
|
prefix: index_
|
|
|
|
|
|
|
|
object_store: filesystem
|
|
|
|
|
|
|
|
schema: v12
|
|
|
|
|
|
|
|
store: tsdb
|
|
|
|
|
|
|
|
|
|
|
|
storage_config:
|
|
|
|
storage_config:
|
|
|
|
filesystem:
|
|
|
|
filesystem:
|
|
|
|
directory: /data
|
|
|
|
directory: /data
|
|
|
@ -129,7 +141,7 @@
|
|
|
|
- name: Run Loki
|
|
|
|
- name: Run Loki
|
|
|
|
community.docker.docker_container:
|
|
|
|
community.docker.docker_container:
|
|
|
|
name: loki
|
|
|
|
name: loki
|
|
|
|
image: grafana/loki:2.8.0
|
|
|
|
image: grafana/loki:{{ version }}
|
|
|
|
restart: true
|
|
|
|
restart: true
|
|
|
|
command: -config.file=/mnt/config/loki.yml
|
|
|
|
command: -config.file=/mnt/config/loki.yml
|
|
|
|
ports:
|
|
|
|
ports:
|
|
|
@ -146,7 +158,7 @@
|
|
|
|
- name: Run Promtail
|
|
|
|
- name: Run Promtail
|
|
|
|
community.docker.docker_container:
|
|
|
|
community.docker.docker_container:
|
|
|
|
name: promtail
|
|
|
|
name: promtail
|
|
|
|
image: grafana/promtail:2.8.0
|
|
|
|
image: grafana/promtail:{{ version }}
|
|
|
|
restart: true
|
|
|
|
restart: true
|
|
|
|
command: -config.file=/mnt/config/promtail.yml
|
|
|
|
command: -config.file=/mnt/config/promtail.yml
|
|
|
|
ports:
|
|
|
|
ports:
|
|
|
|