Alpha Chen 2 months ago
parent def23fb4ab
commit 0ed9c5c22f
Signed by: alpha
SSH Key Fingerprint: SHA256:3fOT8fiYQG/aK9ntivV3Bqtg8AYQ7q4nV6ZgihOA20g

@ -3,7 +3,7 @@
vars_files: vars_files:
- vars.yml - vars.yml
vars: vars:
version: 11.0.4 version: 11.1.5
tasks: tasks:
- name: Create Grafana dir - name: Create Grafana dir
@ -73,6 +73,8 @@
- /mnt/lotus-land-story/grafana/grafana.ini:/etc/grafana/grafana.ini - /mnt/lotus-land-story/grafana/grafana.ini:/etc/grafana/grafana.ini
- /mnt/lotus-land-story/grafana/provisioning:/etc/grafana/provisioning - /mnt/lotus-land-story/grafana/provisioning:/etc/grafana/provisioning
- grafana:/var/lib/grafana - grafana:/var/lib/grafana
env:
GF_INSTALL_PLUGINS: https://storage.googleapis.com/integration-artifacts/grafana-lokiexplore-app/grafana-lokiexplore-app-latest.zip;grafana-lokiexplore-app
restart_policy: unless-stopped restart_policy: unless-stopped
networks: networks:
- name: lotus_land_story - name: lotus_land_story

@ -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:

Loading…
Cancel
Save