Skip to content

Commit

Permalink
logging: Collect journal logs from admin-vm
Browse files Browse the repository at this point in the history
This patch will start logging journal logs collected from
admin-vm to grafana server in the cloud.

Signed-off-by: Vunny Sodhi <[email protected]>
  • Loading branch information
vunnyso authored and brianmcgillion committed Aug 5, 2024
1 parent c7eab7f commit 6219563
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions modules/common/logging/logs-aggregator.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,19 @@ in {
// Alloy service can read file in this specific location
filename = "${macAddressPath}"
}
discovery.relabel "adminJournal" {
targets = []
rule {
source_labels = ["__journal__hostname"]
target_label = "nodename"
}
}
loki.source.journal "journal" {
path = "/var/log/journal"
relabel_rules = discovery.relabel.adminJournal.rules
forward_to = [loki.write.remote.receiver]
}
loki.write "remote" {
endpoint {
Expand Down

0 comments on commit 6219563

Please sign in to comment.