{"repo":"parvvaresh/logstack","free":true,"listed":false,"github":"https://github.com/parvvaresh/logstack","clone":"git clone https://github.com/parvvaresh/logstack.git","description":"Dockerized logging stack that collects container logs, parses them, and shows them in Grafana with useful charts.","language":"Go","stars":13,"topics":["grafana","loki","monitoring"],"license":null,"category":"analytics","readme_excerpt":"LogStack — Go + Promtail + Loki + Grafana Dockerized logging stack that collects container logs, parses them, and shows them in Grafana with useful charts. Stack: Go service (app) → Promtail (collect & label) → Loki (store & index labels) → Grafana (Explore/Dashboards) --- TL;DR (Quickstart) --- Directory layout --- Compose (recommended shape) Key points we use now: No version: (Compose v2 ignores it) Loki uses built-in local-config.yaml for maximum compatibility Healthcheck on Loki; Promtail/Grafana wait until Loki is healthy All services on a bridge network named loki If something else is using host port 3000 , either free it ( sudo fuser -k 3000/tcp ) or change the mapping to \"3001:3000\" . --- Promtail config (labels + JSON parsing) promtail/config.yml : On macOS/Windows (Docker Desktop), direct bind of /var/lib/docker/containers won’t work the same way because Docker runs in a VM. Prefer Linux host for this setup. --- Go service logging (make it JSON!) In go-service/main.go , make sure the logger outputs pure JSON (so json in LogQL can extract fields): Rebuild & run: Test requests: --- Grafana URL: http://localhost:3000 (admin/admin → change password) Datasource provisioning points to Loki. Use Explore first, then build dashboards. Useful LogQL: If service=\"app\" is empty , try {container=\"app\"} ; it means the service label wasn’t created yet (check Promtail relabels). Dashboard import: Dashboards → Import → paste the JSON I provided earlier. Pick datasource “Loki”. --- Lo","default_branch":null,"files":null,"tree":[],"storefront":"/r/parvvaresh","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/parvvaresh/logstack/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}