📦 NEW: Add Loki service and configuration to Docker Compose setup
This commit is contained in:
30
config/loki-config.yaml
Normal file
30
config/loki-config.yaml
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
---
|
||||||
|
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
|
||||||
|
|
||||||
|
schema_config:
|
||||||
|
configs:
|
||||||
|
- from: 2020-10-24
|
||||||
|
store: tsdb
|
||||||
|
object_store: filesystem
|
||||||
|
schema: v13
|
||||||
|
index:
|
||||||
|
prefix: index_
|
||||||
|
period: 24h
|
||||||
|
|
||||||
|
ruler:
|
||||||
|
alertmanager_url: http://localhost:9093
|
||||||
@@ -4,6 +4,8 @@ volumes:
|
|||||||
driver: local
|
driver: local
|
||||||
prometheus-data:
|
prometheus-data:
|
||||||
driver: local
|
driver: local
|
||||||
|
data_loki:
|
||||||
|
driver: local
|
||||||
networks:
|
networks:
|
||||||
grafana-prometheus:
|
grafana-prometheus:
|
||||||
external: true
|
external: true
|
||||||
@@ -58,6 +60,26 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
- grafana-prometheus
|
- grafana-prometheus
|
||||||
|
loki:
|
||||||
|
container_name: loki
|
||||||
|
image: docker.io/grafana/loki:3.5.0
|
||||||
|
command: "-config.file=/etc/loki/config.yaml" # Tells Grafana Loki to start with the config file.
|
||||||
|
ports:
|
||||||
|
# --> (Optional) Remove when using traefik...
|
||||||
|
- "3100:3100"
|
||||||
|
# <--
|
||||||
|
volumes:
|
||||||
|
- ./config/loki-config.yaml:/etc/loki/config.yaml:ro
|
||||||
|
- data_loki:/loki:rw
|
||||||
|
networks:
|
||||||
|
- grafana-prometheus
|
||||||
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "wget", "--spider", "-q", "http://localhost:3100/ready"]
|
||||||
|
interval: 10s # check every 10 seconds
|
||||||
|
timeout: 5s # wait max 5 seconds per check
|
||||||
|
retries: 5 # mark as unhealthy after 5 failures
|
||||||
|
start_period: 20s # wait 20s after container starts before first check
|
||||||
https_portal:
|
https_portal:
|
||||||
container_name: https_portal
|
container_name: https_portal
|
||||||
image: "steveltn/https-portal:1.21"
|
image: "steveltn/https-portal:1.21"
|
||||||
@@ -82,3 +104,4 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- prometheus
|
- prometheus
|
||||||
- grafana
|
- grafana
|
||||||
|
- loki
|
||||||
Reference in New Issue
Block a user