Sending beats from journalctl (systemd’s logging provider) to logstash/elasticsearch with JournalBeat on Github

Ubuntu 16.04 or 18.04

Install required packages to build (libsystemd-dev and golang-go)

$ sudo apt install libsystemd-dev golang-go
$ vi ~/.bashrc

Add the following lines:

export GOPATH=$HOME/go
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin

Open a new shell. (or . ~/.bashrc’)

$ go get github.com/mheese/journalbeat


Once retrieved, move files to production locations (including other computers)

sudo cp ~/go/bin/journalbeat /bin/
sudo mkdir -p /etc/journalbeat/ && sudo cp ~/go/src/github.com/mheese/journalbeat/etc/journalbeat.yml /etc/journalbeat/

Adjust journalbeat.yml as needed

sudo vi /etc/journalbeat/journalbeat.yml

Create systemd unit file

sudo vi /lib/systemd/system/journalbeat.service
Description=JournalBeat service

ExecStart=/bin/journalbeat -c /etc/journalbeat/journalbeat.yml


Test service

sudo systemctl start journalbeat

sudo systemctl status journalbeat

If everything looks good

sudo systemctl enable journalbeat
Up next Installing Dropbox on Arch Linux Note: This is an old article, It’s likely outdated. https://www.dropbox.com/install I Installed to my home directory with the Headless install. Notes on Van Life I’ve spent 15+ years in the IT field and a few years back the company I work for adjusted their business model to include ethically (my ethics)
Latest posts Financial Notes Welding Notes Cast a URL to a Chromecast Email List System Design Cards About Music, Finding the good stuff. “Richie Pan’s America” Font Airflow Notes shirt designs Now Learning Graphical Design Python Notes Deploy to a Remote Docker registry DMented 'zine for DM's and Character Sheets for Players Online Security Find Notes Kawasaki Vulcan S 650 Notes Honda Rebel 300 Notes Samba Notes Things worth noting My Software Friends Favorites Recommended Tech Elasticsearch Notes Book Notes APRS Notes vim notes Nmap Notes 4runner Notes Bash Notes