honeycombio/logspout-honeycomb

Name: logspout-honeycomb

Owner: Honeycomb

Description: Honeycomb adapter for LogSpout

Created: 2016-06-26 00:41:56.0

Updated: 2018-04-09 14:01:17.0

Pushed: 2018-04-03 22:47:33.0

Homepage: null

Size: 23

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

logspout-honeycomb

Honeycomb adapter for Logspout. More documentation can be found in Honeycomb docs.

Expects to ingest JSON log lines, and will send JSON blobs up to Honeycomb, annotated with the current logspout stream, container, container ID, hostname, and docker image name.

If the log lines being streamed through Logspout aren't JSON, the contents of the message will be tucked under a "message" key in the Honeycomb payload, alongside the metadata mentioned above.

Building

To build the Honeycomb Logspout Docker image, run:

Configuration and invocation

This module can be configured either by setting environment variables in Docker, or by using the Logspout routesapi. The following variables are available:

Env. Variable | routesapi key | Type | Required? | Description | | — | — | — | — | —–| | HONEYCOMB_WRITE_KEY | writeKey | string | required | Your Honeycomb team's write key. | | HONEYCOMB_DATASET | dataset | string | required | The name of the destination dataset in your Honeycomb account. It will be created if it does not already exist. | | HONEYCOMB_SAMPLE_RATE | sampleRate | integer | optional | Sample your event stream: send 1 out of every N events |

Environment variables

Configure the logspout-honeycomb image via environment variables and run the container:

docker run \
    -e "ROUTE_URIS=honeycomb://localhost" \
    -e "HONEYCOMB_WRITE_KEY=<YOUR_WRITE_KEY>" \
    -e "HONEYCOMB_DATASET=<YOUR_DATASET>" \
    --volume=/var/run/docker.sock:/var/run/docker.sock \
    --publish=127.0.0.1:8000:80 \
    honeycombio/logspout-honeycomb
routesapi

Configuration can be set after the logspout-honeycomb image is already running via routesapi:

docker run \
    --volume=/var/run/docker.sock:/var/run/docker.sock \
    --publish=127.0.0.1:8000:80 \
    honeycombio/logspout-honeycomb

curl $(docker port `docker ps -lq` 80)/routes \
    -X POST \
        -d '{"adapter": "honeycomb",
             "address": "honeycomb://localhost",
             "options": {"writeKey":"<YOUR_WRITE_KEY>",
                         "dataset":"<YOUR_DATASET>"}}'

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.