Hi all, first-time poster, and a fan of the whole Grafana-Loki-Promtail setup.
I am currently setting up a system where Grafana, Loki and Promtail are running in separate containers in Docker (and managed via Compose), but all within the same Docker network. I’ve managed to get all three up, but when I tried to configure Grafana to use Loki as a data source, I got the “Unable to connect with Loki. Please check the server logs for more details.” error.
Loki seems to be running fine; when I go to http://localhost:3100/ready, I got the “ready” message. Output on the screen (I ran the docker compose command without the -d switch) also not showing any abnormalities. And if it is a factor, I’m running these in W10.
For reference, here are the relevant Compose profiles:
grafana:
image: "grafana/grafana-enterprise"
profiles:
- grafana
environment:
- GF_SERVER_HTTP_PORT=3500
ports:
- "3500:3500"
volumes:
- "<local path>:/var/lib/grafana"
networks:
- "grafana_network"
loki:
image: grafana/loki
profiles:
- loki
ports:
- "3100:3100"
volumes:
- "<local-path>:/etc/loki"
command: -config.file=/etc/loki/loki-local-config.yaml
networks:
- "grafana_network"
promtail:
image: grafana/promtail
profiles:
- promtail
volumes:
- "<local path>:/etc/promtail"
- "<local path>:/var/log"
command: -config.file=/etc/promtail/promtail-local-config.yaml
networks:
- "grafana_network"