SystemdJournal2Gelf

command module
v0.0.0-...-c29d224 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2018 License: BSD-2-Clause Imports: 11 Imported by: 0

README

SystemdJournal2Gelf

Export entries from systemd's journal and send them to a Graylog server using gelf. This script is written in Google go to make it easier to compile and distribute to your machines.

Dependencies:

Install / Compile

Compile this package by checking out the repo and run:

go get github.com/parse-nl/SystemdJournal2Gelf

The binary will be compiled in $GOPATH/bin/SystemdJournal2Gelf

Or install the package for:

Running as a service

Copy the included SystemdJournal2Gelf.service to /etc/systemd/system.

Usage:

SystemdJournal2Gelf will connect to the server you specify as first argument and passes all other arguments to journalctl. It prepends these arguments with --output=json

  • Export only the kernel messages
SystemdJournal2Gelf localhost:11201 _TRANSPORT=kernel
  • Perform initial import, reading entire journal
SystemdJournal2Gelf localhost:11201 --merge
  • Monitor the journal
SystemdJournal2Gelf localhost:11201 --follow

Logging additional properties:

This script supports a special syntax to send additional properties; when you log a JSON encoded object in the Message field it Unmarshalls it for you

License

Copyright (c) 2016-2017, Parse Software Development B.V.

Released under the Simplified BSD license, see LICENSE for details.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL