GithubHelp home page GithubHelp logo

diegohce / elasticlogger Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 1.0 45 KB

Docker log driver for elasticsearch logging

License: GNU General Public License v3.0

Makefile 8.43% Go 91.57%
docker docker-logging docker-logs elasticsearch go golang logging log logs docker-plugin plugin

elasticlogger's Introduction

Go Report Card Actions Status Actions Status GPLv3 license Maintenance HitCount

elasticlogger

Build & install from source

git clone https://github.com/diegohce/elasticlogger.git ~/go/src/elasticlogger
cd ~/go/src/elasticlogger
make

Pushing to registry

cd ~/go/src/elasticlogger
docker plugin create <registry>/elasticlogger:<tag> ./plugin-dir
docker plugin push <registry>/elasticlogger:<tag>

Installing from regisrtry

Make sure there's no previous elasticlogger installation from build process.

docker plugin ls

If there's any, remove them first.

docker plugin rm <plugin>:<tag>

Now, we can install elasticlogger from registry.

docker plugin install --alias elasticlogger <registry>/elasticlogger:<tag>

Optionally, you can set the HOST value at the same time.

docker plugin install --alias elasticlogger <registry>/elasticlogger:<tag> HOST=<elastichost:port>

Configuration

docker plugin set elasticlogger:latest HOST=http[s]://<elastic_host:port>
docker plugin enable elasticlogger:latest

Mandatory plugin settings

Option Description
HOST Elasticsearch server http[s]://host:port

Optional plugin settings

Option Description Default
GCTIMER sets the garbage collector interval 1m
LOG_LEVEL sets the loglevel for the driver's own log entries info
USER User for basic auth  
PASSWORD PASSWORD for basic auth  
DATESUFFIX Date suffix pattern to append to index name. See Go time package 200601
bulksize sets how many lines of log to send at a time 10

Usage

docker run --log-driver elasticlogger --log-opt index=myappindex ...

Container level settings

Option Description Default
index Elasticsearch index where logs will be stored No default. Mandatory setting.
host will override driver host plugin's HOST value
bulksize sets how many lines of log to send at a time 10
USER User for basic auth  
PASSWORD PASSWORD for basic auth  

elasticlogger's People

Contributors

diegohce avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

m-pavel

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.