Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Docker log driver for elasticsearch logging

License

NotificationsYou must be signed in to change notification settings

diegohce/elasticlogger

Repository files navigation

Go Report CardActions StatusActions StatusGPLv3 licenseMaintenanceHitCount

elasticlogger

Build & install from source

git clone https://github.com/diegohce/elasticlogger.git~/go/src/elasticloggercd~/go/src/elasticloggermake

Pushing to registry

cd~/go/src/elasticloggerdocker plugin create<registry>/elasticlogger:<tag> ./plugin-dirdocker 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 installelasticlogger from registry.

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

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

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

Configuration

docker pluginset elasticlogger:latest HOST=http[s]://<elastic_host:port>docker pluginenable elasticlogger:latest

Mandatory plugin settings

OptionDescription
HOSTElasticsearch server http[s]://host:port

Optional plugin settings

OptionDescriptionDefault
GCTIMERsets the garbage collector interval1m
LOG_LEVELsets the loglevel for the driver's own log entriesinfo
USERUser for basic auth 
PASSWORDPASSWORD for basic auth 
DATESUFFIXDate suffix pattern to append to index name. See Gotime package200601
bulksizesets how many lines of log to send at a time10

Usage

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

Container level settings

OptionDescriptionDefault
indexElasticsearch index where logs will be storedNo default. Mandatory setting.
hostwill override driver hostplugin's HOST value
bulksizesets how many lines of log to send at a time10
USERUser for basic auth 
PASSWORDPASSWORD for basic auth 

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp