https://github.com/ghusta/java-loki-demo
Demo Java / Loki / Grafana
https://github.com/ghusta/java-loki-demo
java loki
Last synced: 4 months ago
JSON representation
Demo Java / Loki / Grafana
- Host: GitHub
- URL: https://github.com/ghusta/java-loki-demo
- Owner: ghusta
- Created: 2023-09-26T14:21:42.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-11-09T12:53:41.000Z (7 months ago)
- Last Synced: 2025-01-06T22:35:48.115Z (5 months ago)
- Topics: java, loki
- Language: Java
- Homepage:
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.adoc
Awesome Lists containing this project
README
= Demo Java / Loki / Grafana
== Overview
Demo for testing :
* Java
* Loki with Logback (_https://github.com/loki4j/loki-logback-appender[loki-logback-appender]_)
* Grafana== Run the demo
=== Start Loki and Grafana instances
With Docker :
[source,bash]
----
docker compose up -d
----Open Grafana at : http://localhost:3000/explore
Check Loki at :
* http://localhost:3100/ready (readiness)
* http://localhost:3100/metrics (Prometheus metrics)=== Generate logs with Java
Execute `com.example.Demo`.
== References
* https://grafana.com/docs/loki/latest/[Grafana Loki documentation]
** https://grafana.com/docs/loki/latest/get-started/[Get started]
** https://grafana.com/docs/loki/latest/get-started/overview/[Loki overview]
** https://grafana.com/docs/loki/latest/query/[LogQL: Log query language]
** https://grafana.com/docs/loki/latest/query/logcli/[LogCLI]
* https://piotrminkowski.com/2023/07/05/logging-in-spring-boot-with-loki/