Split monitoring/logging stack so clients can federate onto the server
This commit is contained in:
1
ansible/plays/services/loki/.env
Normal file
1
ansible/plays/services/loki/.env
Normal file
@ -0,0 +1 @@
|
||||
COMPOSE_PROJECT_NAME=loki
|
27
ansible/plays/services/loki/docker-compose.yaml
Normal file
27
ansible/plays/services/loki/docker-compose.yaml
Normal file
@ -0,0 +1,27 @@
|
||||
version: "3.4"
|
||||
services:
|
||||
loki:
|
||||
image: grafana/loki:latest
|
||||
restart: unless-stopped
|
||||
command: -config.file=/etc/loki/loki.yaml
|
||||
volumes:
|
||||
- ./loki.yml:/etc/loki/loki.yaml:ro,Z
|
||||
- loki_data:/loki
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.loki.rule=Host(`loki.tobiasmanske.de`)"
|
||||
- "traefik.http.middlewares.loki-auth.basicauth.users={{ common.loki.username }}:{{ common.loki.password_hash | mandatory }}"
|
||||
- "traefik.http.routers.loki.entryPoints=websecure"
|
||||
- "traefik.http.services.loki.loadbalancer.server.port=3100"
|
||||
- "traefik.http.routers.loki.middlewares=loki-auth"
|
||||
- "prometheus-scrape.enabled=true"
|
||||
- "prometheus-scrape.port=3100"
|
||||
networks:
|
||||
- metrics
|
||||
- default
|
||||
|
||||
volumes:
|
||||
loki_data:
|
||||
networks:
|
||||
metrics:
|
||||
external: true
|
51
ansible/plays/services/loki/loki.yml
Normal file
51
ansible/plays/services/loki/loki.yml
Normal file
@ -0,0 +1,51 @@
|
||||
auth_enabled: false
|
||||
|
||||
server:
|
||||
http_listen_port: 3100
|
||||
grpc_listen_port: 9096
|
||||
|
||||
query_range:
|
||||
results_cache:
|
||||
cache:
|
||||
embedded_cache:
|
||||
enabled: true
|
||||
max_size_mb: 100
|
||||
|
||||
schema_config:
|
||||
configs:
|
||||
- from: 2020-10-24
|
||||
store: boltdb-shipper
|
||||
object_store: aws
|
||||
schema: v11
|
||||
index:
|
||||
prefix: index_
|
||||
period: 24h
|
||||
|
||||
common:
|
||||
path_prefix: /loki
|
||||
storage:
|
||||
s3:
|
||||
endpoint: s3.tobiasmanske.de
|
||||
bucketnames: loki-data
|
||||
access_key_id: "{{ loki.s3.access_key }}"
|
||||
secret_access_key: "{{ loki.s3.secret_key }}"
|
||||
s3forcepathstyle: true
|
||||
replication_factor: 1
|
||||
ring:
|
||||
kvstore:
|
||||
store: inmemory
|
||||
|
||||
compactor:
|
||||
working_directory: /loki/compactor
|
||||
shared_store: s3
|
||||
|
||||
storage_config:
|
||||
boltdb_shipper:
|
||||
active_index_directory: /loki/active
|
||||
cache_location: /loki/cache
|
||||
cache_ttl: 24h
|
||||
resync_interval: 5s
|
||||
shared_store: s3
|
||||
aws:
|
||||
s3: "s3://{{ loki.s3.access_key }}:{{ loki.s3.secret_key }}@s3.tobiasmanske.de.:443/loki-data"
|
||||
s3forcepathstyle: true
|
Reference in New Issue
Block a user