8000 GitHub - atopion/baldr: Baldr: Loki's brother for Clusters
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

atopion/baldr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Baldr: Loki's brother for Clusters

Baldr (Baldr's All-Seeing Log Data Realm) is a reimplementation of Grafana's Loki, optimized for aggregating system logs of large clusters of nodes, not Kubernetes pods. By significantly reducing the feature set compared to Loki, stripping out parts such as clustering/sharding, multi-tenancy, the web UI or the alert system, it manages to perform the Loki's key task of storing log lines to disk as they come in and performing LogQL searches on the stored Logs, on a significantly smaller code base.

Compared to Loki, Baldr:

  • is optimized for system logs such as journald, not Kubernetes pods.
  • stores logs in plaintext files, compressed with gzip, for easy readability and searchability even without Baldr
  • creates one file per instance and day, as opposed to one per individual stream, to drastically reduce the load on the filesystem
  • has a simplified configuration and deployment: only a few command-line flags are necessary

Just like Loki, Baldr:

  • Ties in seamlessly to the ecosystem: Capture logs with Alloy, investigate them on Grafana dashboards, no configuration changes needed.
  • Does not have any dependencies, just a single go binary.

Getting started

A Github releases section is coming soon. Until then:

  • Install Golang (at least version 1.24.3)
  • Clone the repository: git clone https://github.com/atopion/baldr.git
  • Build Baldr: go build . in the source directory
  • Run Baldr: ./baldr -port <port> -folder <folder>

Configuration

Baldr has a minimalistic configuration approach. The only command-line flags available are:

-port: specifies the port to listen on
-folder: specifies the folder to store received logs in
-help: displays this help message
-verbose/-v: enables verbose logging
-debug/-d: enables debug logging

Metrics:

  • Code Size: Baldr has 99.97% fewer lines of code than the original Loki. (Baldr: 11 files / 2763 LoC vs Loki: 14547 file / 8412375 LoC (counted with cloc on 04.06.2025))
  • Storage Efficiency: On a test setup (Grafana alloy, on a not very busy developer laptop, running one systemd-cat call per sec. for 400 sec.), Baldr created 1 file, with 44kB, compared to the original Loki, who created 13 files, totaling 64kB.

About

Baldr: Loki's brother for Clusters

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0