diff --git a/server/config/monitoring/docker-compose.yml b/server/config/monitoring/docker-compose.yml index 8e467b5..ea03435 100644 --- a/server/config/monitoring/docker-compose.yml +++ b/server/config/monitoring/docker-compose.yml @@ -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 diff --git a/server/config/monitoring/promtail-config.yml b/server/config/monitoring/promtail-config.yml new file mode 100644 index 0000000..af8df5d --- /dev/null +++ b/server/config/monitoring/promtail-config.yml @@ -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 \ No newline at end of file