Code Monkey home page Code Monkey logo

docker2le's Introduction

docker2le

log shipper from docker to logentries

Dependencies

  • Node.js 7.6.0
  • dockerode

How to run

  1. set DOCKER_LE_CONFIG as config JSON string
  2. run the script

Configuration format

{
  "default":{
    "labels":["myname"],
    "token":"LOGSET_TOKEN_DEFAULT"
    },
    "filters":[
      {"labels":["myname","tag1"],"filter":["tag1=a","tag2=1"],"token":"LOGSET_TOKEN_1"},
      {"labels":["myname","tag2"],"filter":["tag1=b","tag2=1"],"token":"LOGSET_TOKEN_2"}
    ]
}

Every running container will go through the filter rules of filters, the logs of the matched container will be sent to logentries API, with the labels.

Example

export DOCKER_LE_CONFIG='{"default":{"labels":["myname"],"token":"29a3d766-6555-4715-9d39-78c5a32d5a32"},"filters":[{"labels":["myname","tag1"],"filter":["tag1=a","tag2=1"],"token":"29a3d766-6555-4715-9d39-78c5a32d5a32"},{"labels":["myname","tag2"],"filter":["tag1=b","tag2=1"],"token":"f88530a3-4a07-404b-8695-b06e93e964a2"}]}
node docker2le

docker2le's People

Watchers

 avatar

docker2le's Issues

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.