Coder Social home page Coder Social logo

journal-2-logentries's Introduction

journal-2-logentries

Ship systemd journal entires to logentries.com over SSL.

Usage

sudo LOGENTRIES_TOKEN=<token> journal-2-logentries
sudo docker run -d -e 'LOGENTRIES_TOKEN=<token>' -v /run/journald.sock:/run/journald.sock \
quay.io/kelseyhightower/journal-2-logentries

Configuration

All configuration is done through env vars.

  • LOGENTRIES_JOURNAL_SOCKET - The systemd-journal-gatewayd socket. /run/journald.sock
  • LOGENTRIES_URL - The log entry url. api.logentries.com:20000
  • LOGENTRIES_TOKEN - The logentries.com TCP token -- See https://logentries.com/doc/input-token

Building

GO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags '-w' .

Docker

docker build -t quay.io/<username>/journal-2-logentries .
docker push quay.io/<username>/journal-2-logentries

Fleet integration

etcdctl set /logentries.com/token <token>

Edit journal-2-logentries.service

[Unit]
Description=Forward Systemd Journal to logentries.com

[Service]
TimeoutStartSec=0
ExecStartPre=-/usr/bin/docker kill journal-2-logentries
ExecStartPre=-/usr/bin/docker rm journal-2-logentries
ExecStartPre=/usr/bin/docker pull quay.io/kelseyhightower/journal-2-logentries
ExecStart=/usr/bin/bash -c \
"/usr/bin/docker run --name journal-2-logentries \
-v /run/journald.sock:/run/journald.sock \
-e LOGENTRIES_TOKEN=`etcdctl get /logentries.com/token` \
quay.io/kelseyhightower/journal-2-logentries"

[X-Fleet]
Global=true
fleetctl start journal-2-logentries.service

journal-2-logentries's People

Contributors

kelseyhightower avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.