This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
services:
|
||||
loki:
|
||||
image: grafana/loki:3.2.1
|
||||
command: -config.file=/etc/loki/local-config.yaml
|
||||
ports:
|
||||
- "${LOKI_PORT:-3100}:3100"
|
||||
volumes:
|
||||
- loki_data:/loki
|
||||
restart: unless-stopped
|
||||
|
||||
promtail:
|
||||
image: grafana/promtail:3.2.1
|
||||
command: -config.file=/etc/promtail/config.yml
|
||||
volumes:
|
||||
- /var/log:/var/log:ro
|
||||
- /var/lib/docker/containers:/var/lib/docker/containers:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
- ./promtail-config.yml:/etc/promtail/config.yml:ro
|
||||
depends_on:
|
||||
- loki
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
loki_data:
|
||||
@@ -0,0 +1,25 @@
|
||||
server:
|
||||
http_listen_port: 9080
|
||||
grpc_listen_port: 0
|
||||
|
||||
positions:
|
||||
filename: /tmp/positions.yaml
|
||||
|
||||
clients:
|
||||
- url: http://loki:3100/loki/api/v1/push
|
||||
|
||||
scrape_configs:
|
||||
- job_name: docker
|
||||
docker_sd_configs:
|
||||
- host: unix:///var/run/docker.sock
|
||||
refresh_interval: 10s
|
||||
relabel_configs:
|
||||
- source_labels: ['__meta_docker_container_name']
|
||||
regex: '/(.*)'
|
||||
target_label: 'container'
|
||||
- source_labels: ['__meta_docker_container_label_com_docker_compose_service']
|
||||
target_label: 'service'
|
||||
- source_labels: ['__meta_docker_container_label_com_docker_compose_project']
|
||||
target_label: 'stack'
|
||||
- source_labels: ['__meta_docker_container_log_stream']
|
||||
target_label: 'stream'
|
||||
@@ -0,0 +1,28 @@
|
||||
services:
|
||||
log-guardian:
|
||||
image: gitea.wayfinderak.com/wayfinderak/log-guardian:${IMAGE_TAG:-latest}
|
||||
environment:
|
||||
LOG_GUARDIAN_ADDR: :8080
|
||||
LOG_GUARDIAN_DATA_PATH: /data/config.json
|
||||
LOG_GUARDIAN_POLL_INTERVAL: ${LOG_GUARDIAN_POLL_INTERVAL:-1m}
|
||||
LOG_GUARDIAN_DRY_RUN_ACTIONS: ${LOG_GUARDIAN_DRY_RUN_ACTIONS:-true}
|
||||
LOKI_URL: ${LOKI_URL:-http://loki:3100}
|
||||
LOKI_TENANT_ID: ${LOKI_TENANT_ID:-}
|
||||
LOKI_USERNAME: ${LOKI_USERNAME:-}
|
||||
LOKI_PASSWORD: ${LOKI_PASSWORD:-}
|
||||
LOG_GUARDIAN_ANALYSIS_PROVIDER: ${LOG_GUARDIAN_ANALYSIS_PROVIDER:-none}
|
||||
LOG_GUARDIAN_ANALYSIS_ENDPOINT: ${LOG_GUARDIAN_ANALYSIS_ENDPOINT:-}
|
||||
LOG_GUARDIAN_ANALYSIS_TOKEN: ${LOG_GUARDIAN_ANALYSIS_TOKEN:-}
|
||||
volumes:
|
||||
- log_guardian_data:/data
|
||||
ports:
|
||||
- "${LOG_GUARDIAN_PORT:-8081}:8080"
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:8080/healthz"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
log_guardian_data:
|
||||
@@ -0,0 +1,11 @@
|
||||
IMAGE_TAG=latest
|
||||
LOG_GUARDIAN_PORT=8081
|
||||
LOG_GUARDIAN_POLL_INTERVAL=1m
|
||||
LOG_GUARDIAN_DRY_RUN_ACTIONS=true
|
||||
LOKI_URL=http://loki:3100
|
||||
LOKI_TENANT_ID=
|
||||
LOKI_USERNAME=
|
||||
LOKI_PASSWORD=
|
||||
LOG_GUARDIAN_ANALYSIS_PROVIDER=none
|
||||
LOG_GUARDIAN_ANALYSIS_ENDPOINT=
|
||||
LOG_GUARDIAN_ANALYSIS_TOKEN=
|
||||
Reference in New Issue
Block a user