{"id":19393032,"url":"https://github.com/ruanbekker/docker-promtail-loki","last_synced_at":"2025-04-14T00:10:41.152Z","repository":{"id":139706839,"uuid":"567367743","full_name":"ruanbekker/docker-promtail-loki","owner":"ruanbekker","description":"Docker Compose Stack with Grafana Loki and Promtail","archived":false,"fork":false,"pushed_at":"2024-07-21T12:29:24.000Z","size":17,"stargazers_count":77,"open_issues_count":1,"forks_count":37,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T10:45:28.327Z","etag":null,"topics":["docker","docker-compose","grafana","logging","loki","promtail"],"latest_commit_sha":null,"homepage":"https://blog.ruanbekker.com/blog/2022/11/18/logging-with-docker-promtail-and-grafana-loki/","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ruanbekker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-17T16:32:55.000Z","updated_at":"2025-03-22T16:26:10.000Z","dependencies_parsed_at":"2025-01-14T14:09:13.277Z","dependency_job_id":"5f48477f-a94d-44ff-9941-89b86a1d92b0","html_url":"https://github.com/ruanbekker/docker-promtail-loki","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruanbekker%2Fdocker-promtail-loki","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruanbekker%2Fdocker-promtail-loki/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruanbekker%2Fdocker-promtail-loki/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruanbekker%2Fdocker-promtail-loki/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruanbekker","download_url":"https://codeload.github.com/ruanbekker/docker-promtail-loki/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248799955,"owners_count":21163404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","grafana","logging","loki","promtail"],"created_at":"2024-11-10T10:32:31.203Z","updated_at":"2025-04-14T00:10:41.116Z","avatar_url":"https://github.com/ruanbekker.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-promtail-loki\nDocker Compose Stack with Grafana Loki, Promtail and the Grafana [Explore Logs](https://grafana.com/blog/2024/04/09/find-your-logs-data-with-explore-logs-no-logql-required/) plugin.\n\n\u003e [!NOTE]  \n\u003e For a full example with prometheus, alertmanager, cadvisor, node-exporter and loki, please see the following repo:\n\u003e - https://github.com/ruanbekker/docker-monitoring-stack-gpnc\n\n## Usage\n\nStart the stack with:\n\n```bash\nmake up\n```\n\nAccess nginx on http://localhost:8080\n\n## View Logs\n\n\u003cimg width=\"1113\" alt=\"image\" src=\"https://user-images.githubusercontent.com/567298/202505252-3cbc2d03-d1d2-48e6-bea7-5db54233b9a2.png\"\u003e\n\nThen navigate to grafana on http://localhost:3000 and select explore on the left and select the container:\n\n\u003cimg width=\"560\" alt=\"image\" src=\"https://user-images.githubusercontent.com/567298/202504989-e05a08a2-eb2f-41a1-85f4-9a11a8affd7c.png\"\u003e\n\nAnd you will see the logs:\n\n\u003cimg width=\"1425\" alt=\"image\" src=\"https://user-images.githubusercontent.com/567298/202505099-c47b76cc-3090-4eb9-8459-db659d0aac18.png\"\u003e\n\n## Explore Logs\n\nThe grafana explore-logs app can be found under explore:\n\n![image](https://github.com/user-attachments/assets/14aa2b93-8baf-441b-bd18-eeade5dd575c)\n\nAny application that logs to Loki can be discovered here:\n\n\u003cimg width=\"1329\" alt=\"image\" src=\"https://github.com/user-attachments/assets/2d03c559-1046-4897-9429-eb9bc6fc89ee\"\u003e\n\nHere we can view the log content for the selected `service_name`:\n\n\u003cimg width=\"1327\" alt=\"image\" src=\"https://github.com/user-attachments/assets/1eb0e32f-5019-437e-b760-b1a63cbc8beb\"\u003e\n\nThis view we can explore the different labels thats available for our selected service:\n\n\u003cimg width=\"1333\" alt=\"image\" src=\"https://github.com/user-attachments/assets/a222ab21-5c3f-4f66-b01e-9e882c1a8df2\"\u003e\n\nFor example, we can select the `level` label, which will then append that to our LogQL query and present us with this view:\n\n\u003cimg width=\"1330\" alt=\"image\" src=\"https://github.com/user-attachments/assets/f805b460-6f70-4298-a8b3-2118e4931266\"\u003e\n\nWe can then include `error` for example and we will see all the error logs for our selected service:\n\n\u003cimg width=\"1332\" alt=\"image\" src=\"https://github.com/user-attachments/assets/d1502c06-5cae-498d-81e0-470afd7890dd\"\u003e\n\nWe can then also select \"Open in Explore\" and our query will be pre-populated for us, eg. `{service_name=\"tempo-ingester\", level=\"error\"} | logfmt`:\n\n\u003cimg width=\"1330\" alt=\"image\" src=\"https://github.com/user-attachments/assets/974b8916-c9f6-466a-994e-52d10e771353\"\u003e\n\nWe can also explore logs by fields:\n\n\u003cimg width=\"1336\" alt=\"image\" src=\"https://github.com/user-attachments/assets/3b459123-f132-422c-8ac3-ea69898e7f94\"\u003e\n\nAs well as patterns:\n\n\u003cimg width=\"1334\" alt=\"image\" src=\"https://github.com/user-attachments/assets/f2adc9b8-b808-45a5-8dab-d17accd31aa0\"\u003e\n\nFor more information about exploring logs without LogQL, view Grafana's blog post:\n- [Find your logs data with Explore Logs: No LogQL required!](https://grafana.com/blog/2024/04/09/find-your-logs-data-with-explore-logs-no-logql-required/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruanbekker%2Fdocker-promtail-loki","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruanbekker%2Fdocker-promtail-loki","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruanbekker%2Fdocker-promtail-loki/lists"}