Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/diegohce/elasticlogger
Docker log driver for elasticsearch logging
https://github.com/diegohce/elasticlogger
docker docker-logging docker-logs docker-plugin elasticsearch go golang log logging logs plugin
Last synced: 20 days ago
JSON representation
Docker log driver for elasticsearch logging
- Host: GitHub
- URL: https://github.com/diegohce/elasticlogger
- Owner: diegohce
- License: gpl-3.0
- Created: 2019-12-26T23:37:22.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-20T16:57:47.000Z (over 4 years ago)
- Last Synced: 2023-03-11T14:37:52.006Z (almost 2 years ago)
- Topics: docker, docker-logging, docker-logs, docker-plugin, elasticsearch, go, golang, log, logging, logs, plugin
- Language: Go
- Homepage:
- Size: 43.9 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Go Report Card](https://goreportcard.com/badge/github.com/diegohce/elasticlogger)](https://goreportcard.com/report/github.com/diegohce/elasticlogger)
[![Actions Status](https://github.com/diegohce/elasticlogger/workflows/Build/badge.svg)](https://github.com/diegohce/elasticlogger/actions)
[![Actions Status](https://github.com/diegohce/elasticlogger/workflows/Test/badge.svg)](https://github.com/diegohce/elasticlogger/actions)
[![GPLv3 license](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://github.com/diegohce/elasticlogger/blob/master/LICENSE)
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/diegohce/elasticlogger/graphs/commit-activity)
[![HitCount](http://hits.dwyl.io/diegohce/elasticlogger.svg)](http://hits.dwyl.io/diegohce/elasticlogger)# elasticlogger
# Build & install from source
```bash
git clone https://github.com/diegohce/elasticlogger.git ~/go/src/elasticlogger
cd ~/go/src/elasticlogger
make
```
## Pushing to registry```bash
cd ~/go/src/elasticlogger
docker plugin create /elasticlogger: ./plugin-dir
docker plugin push /elasticlogger:
```
## Installing from regisrtry
Make sure there's no previous elasticlogger installation from build process.
```bash
docker plugin ls
```
If there's any, remove them first.
```bash
docker plugin rm :
```
Now, we can install `elasticlogger` from registry.
```bash
docker plugin install --alias elasticlogger /elasticlogger:
```
Optionally, you can set the `HOST` value at the same time.
```bash
docker plugin install --alias elasticlogger /elasticlogger: HOST=
```# Configuration
```bash
docker plugin set elasticlogger:latest HOST=http[s]://
docker plugin enable elasticlogger:latest
```
## Mandatory plugin settingsOption
DescriptionHOST
Elasticsearch server http[s]://host:port## Optional plugin settings
Option
Description
DefaultGCTIMER
sets the garbage collector interval
1mLOG_LEVEL
sets the loglevel for the driver's own log entries
infoUSER
User for basic auth
PASSWORD
PASSWORD for basic auth
DATESUFFIX
Date suffix pattern to append to index name. See Go time package
200601bulksize
sets how many lines of log to send at a time
10# Usage
```bash
docker run --log-driver elasticlogger --log-opt index=myappindex ...
```## Container level settings
Option
Description
Defaultindex
Elasticsearch index where logs will be stored
No default. Mandatory setting.host
will override driver host
plugin's HOST valuebulksize
sets how many lines of log to send at a time
10USER
User for basic auth
PASSWORD
PASSWORD for basic auth