Last active
March 1, 2021 18:28
-
-
Save mehranz/5c423bce73cb13021621fa19f57c8bd3 to your computer and use it in GitHub Desktop.
docker compose to run grafana + loki.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
networks: | |
loki: | |
services: | |
loki: | |
image: grafana/loki:2.0.0 | |
ports: | |
- "3100:3100" | |
command: -config.file=/etc/loki/local-config.yaml | |
networks: | |
- loki | |
promtail: | |
image: grafana/promtail:2.0.0 | |
volumes: | |
- /var/log:/var/log | |
- $GRAFANA_HOME/config:/etc/promtail | |
command: -config.file=/etc/promtail/config.yml | |
networks: | |
- loki | |
grafana: | |
image: grafana/grafana:latest | |
ports: | |
- "3008:3000" | |
networks: | |
- loki |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: system | |
static_configs: | |
- targets: | |
- localhost | |
labels: | |
job: varlogs | |
__path__: /var/log/*log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you should set $GRAFANA_HOME variable to a directory that contains the config file of promtail. ($GRAFANA_HOME/config/config.yml)