Public | Automated Build

Last pushed: 2 years ago
Short Description
Basic ubuntu (baseimage derived) setup to ship syslog to LogEntries
Full Description

baseimage-logentries

Docker image that configures baseimage's syslog-ng to send log messages to Logentries.com.

If you don't already know how baseimage fixes Ubuntu for Docker you should read about it.

Use

This image is available from the Docker registry.

> docker pull flitbit/baseimage-logentries

Requirements

To use this image you'll need to setup LogEntries.com for Token-based Logging.

Set an environment variable LOGENTRIES_TOKEN on your container when you docker run, that's it.

Test-drive

To see it work, launch a container from this image using the following command (replace the invalid GUID with your LogEntries token):

> docker run --rm -i -t -e "LOGENTRIES_TOKEN=00000000-0000-0000-0000-000000000000" flitbit/baseimage-logentries /sbin/my_init -- /bin/bash

The baseimage will initialize Ubuntu and after a moment place you at a bash shell inside the container, use logger to send some test messages and see that they arrive in your log at Logentries:

> logger -t test -p info Hello there Logentries
> logger -t test -p info Everything is ready on my end

As a Base Image

To base your image on baseimage-logentries simply use it in your Dockerfile's FROM line:

FROM flitbit/baseimage-logentries:<VERSION>

# ... any other Dockerfile instructions

Customizing the syslog-ng Template

The default template should serve most needs; it translates to a syslog-ng config of:

template("`LOGENTRIES_TOKEN` $ISODATE $HOST $FACILITY $PRIORITY $MSG\n")

Take a look at logentries-message-template and logentries-conf-template to see the simplistic way the template gets built.

Basically, the contents of logentries-message-template becomes the template line that determines how messages look to LogEntries.

You can override the logentries-message-template in your derived container by supplying your own logentries-message-template file to overwrite the default:

FROM flitbit/baseimage-logentries:<VERSION>

ADD logentries-message-template /var/logentries/logentries-message-template

# ... any other Dockerfile instructions

Feedback

Hopefully you find this image useful.

If you find issues post it here -- we also welcome pull requests.

Docker Pull Command
Owner
flitbit
Source Repository

Comments (0)