Skip to content
Forward systemd journals to Loggly
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
journald
loggly
packaging
.gitignore
Dockerfile
LICENSE
README.md
main.go

README.md

journald-forwarder

Forward systemd journals to Loggly

Usage

./journald-forwarder -token [LogglyToken] -logFile [where to place logs for this app] -tag [Loggly tag] -logFile [path to logfile]

Defaults

-logFile = /var/log/journald-forwarder.log -tag = ""

An example systemd script is available in packaging/systemd, which works on CoreOS.

Building

The easiest way is to run packaging/docker which will statically compile journald-forwarder to a bin folder.

Dev notes

The forwarder first marshals the json into a journald.JournalEntry struct. Then copies the data into loggly.JournalEntry struct and finally marshals into json. This is done to translate the field names from journal names (e.g. ___PID) into nicer loggly names (e.g. Pid) and additionally to convert the timestamp into miliseconds.

License

journald-forwarder is released under the Apache 2.0 license. See the LICENSE file for details.

You can’t perform that action at this time.