-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Loki and Grafana for Logging (#100)
* Experimental logback-spring setup for Loki and Grafana * Final commit for this branch * Add new grafana-admin environment variables to the deployment.yaml * Add hostname element to Loki in compose.yml
- Loading branch information
Daniel Villavicencio
authored
Jun 21, 2024
1 parent
8cd0393
commit 23715b2
Showing
6 changed files
with
97 additions
and
3 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ build/ | |
!**/src/test/**/build/ | ||
\\ | ||
\\.pub | ||
compose.yml | ||
|
||
### STS ### | ||
.apt_generated | ||
|
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<configuration> | ||
<!-- Local configuration --> | ||
<SpringProfile name="local"> | ||
<appender name="LOKI" class="com.github.loki4j.logback.Loki4jAppender"> | ||
<http> | ||
<url>http://localhost:3100/loki/api/v1/push</url> | ||
</http> | ||
<format> | ||
<label> | ||
<pattern>level=%level</pattern> | ||
<readMarkers>true</readMarkers> | ||
</label> | ||
<message> | ||
<pattern>%-5level [%.5(${HOSTNAME})] %.10thread %logger{20} | %msg %ex</pattern> | ||
</message> | ||
</format> | ||
</appender> | ||
<root level="INFO"> | ||
<appender-ref ref="LOKI"/> | ||
</root> | ||
</SpringProfile> | ||
|
||
<!-- Production configuration --> | ||
<SpringProfile name="prod"> | ||
<appender name="LOKI" class="com.github.loki4j.logback.Loki4jAppender"> | ||
<http> | ||
<url>http://loki:3100/loki/api/v1/push</url> | ||
</http> | ||
<format> | ||
<label> | ||
<pattern>level=%level</pattern> | ||
<readMarkers>true</readMarkers> | ||
</label> | ||
<message> | ||
<pattern>%-5level [%.5(${HOSTNAME})] %.10thread %logger{20} | %msg %ex</pattern> | ||
</message> | ||
</format> | ||
</appender> | ||
<root level="INFO"> | ||
<appender-ref ref="LOKI"/> | ||
</root> | ||
</SpringProfile> | ||
</configuration> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"response":{"3021174356":{"milestoneHash":3021174356,"startDate":null,"endDate":null,"activities":null},"644555645":{"milestoneHash":644555645,"startDate":null,"endDate":null,"activities":null},"3181387331":{"milestoneHash":3181387331,"startDate":1701795600.000000000,"endDate":1702400400.000000000,"activities":[{"activityHash":2122313384,"challengeObjectiveHashes":[]}]},"4253138191":{"milestoneHash":4253138191,"startDate":1701795600.000000000,"endDate":1702400400.000000000,"activities":null},"3603098564":{"milestoneHash":3603098564,"startDate":1701795600.000000000,"endDate":1702400400.000000000,"activities":null},"3802603984":{"milestoneHash":3802603984,"startDate":null,"endDate":null,"activities":null},"2709491520":{"milestoneHash":2709491520,"startDate":null,"endDate":null,"activities":null},"2594202463":{"milestoneHash":2594202463,"startDate":null,"endDate":null,"activities":null},"3899487295":{"milestoneHash":3899487295,"startDate":null,"endDate":null,"activities":null},"2712317338":{"milestoneHash":2712317338,"startDate":1715702400.000000000,"endDate":1716307200.000000000,"activities":[{"activityHash":1042180643,"challengeObjectiveHashes":["2398860795"]}]},"541780856":{"milestoneHash":541780856,"startDate":1701795600.000000000,"endDate":1702400400.000000000,"activities":[{"activityHash":910380154,"challengeObjectiveHashes":[]}]},"526718853":{"milestoneHash":526718853,"startDate":1715702400.000000000,"endDate":1716307200.000000000,"activities":[{"activityHash":1262462921,"challengeObjectiveHashes":["3211393925"]},{"activityHash":2296818662,"challengeObjectiveHashes":["3211393925"]}]}}} | ||
{"response":{"3021174356":{"milestoneHash":3021174356,"startDate":null,"endDate":null,"activities":null},"644555645":{"milestoneHash":644555645,"startDate":null,"endDate":null,"activities":null},"3181387331":{"milestoneHash":3181387331,"startDate":1701795600.000000000,"endDate":1702400400.000000000,"activities":[{"activityHash":2122313384,"challengeObjectiveHashes":[]}]},"4253138191":{"milestoneHash":4253138191,"startDate":1701795600.000000000,"endDate":1702400400.000000000,"activities":null},"3603098564":{"milestoneHash":3603098564,"startDate":1701795600.000000000,"endDate":1702400400.000000000,"activities":null},"3802603984":{"milestoneHash":3802603984,"startDate":null,"endDate":null,"activities":null},"2709491520":{"milestoneHash":2709491520,"startDate":null,"endDate":null,"activities":null},"2594202463":{"milestoneHash":2594202463,"startDate":null,"endDate":null,"activities":null},"3899487295":{"milestoneHash":3899487295,"startDate":null,"endDate":null,"activities":null},"2712317338":{"milestoneHash":2712317338,"startDate":1718726400.000000000,"endDate":1719331200.000000000,"activities":[{"activityHash":1042180643,"challengeObjectiveHashes":["2398860795"]}]},"541780856":{"milestoneHash":541780856,"startDate":1701795600.000000000,"endDate":1702400400.000000000,"activities":[{"activityHash":910380154,"challengeObjectiveHashes":[]}]},"526718853":{"milestoneHash":526718853,"startDate":1718726400.000000000,"endDate":1719331200.000000000,"activities":[{"activityHash":1262462921,"challengeObjectiveHashes":["3211393925"]},{"activityHash":2296818662,"challengeObjectiveHashes":["3211393925"]}]}}} |