Init promtail

This commit is contained in:
Joey Hafner 2022-08-08 15:41:03 -07:00
parent 6882d5fbec
commit 6676792ae2
2 changed files with 37 additions and 0 deletions

View File

@ -78,6 +78,24 @@ services:
- traefik.http.routers.loki.rule=Host(`loki.jafner.net`)
- traefik.http.routers.loki.tls.certresolver=lets-encrypt
promtail:
image: grafana/promtail
container_name: monitoring_promtail
logging:
driver: loki
options:
loki-url: http://localhost:3100/loki/api/v1/push
loki-batch-size: "50"
loki-retries: "1"
loki-timeout: "2s"
keep-file: "true"
networks:
- monitoring
volumes:
- /var/log:/var/log:ro
- ${DOCKER_DATA}/etc/promtail
- ./promtail-config.yml:/etc/promtail/promtail-config.yml
exporter-pihole:
image: ekofr/pihole-exporter:latest
container_name: monitoring_exporter-pihole

View File

@ -0,0 +1,19 @@
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: varlogs_joey-server
static_configs:
- targets:
- localhost
labels:
job: varlogs
__path__: /var/log/*log