项目作者: Vincit

项目描述 :
Logspout with GELF adapter
高级语言: Dockerfile
项目地址: git://github.com/Vincit/logspout-gelf.git
创建时间: 2017-02-17T09:42:19Z
项目社区:https://github.com/Vincit/logspout-gelf

开源协议:

下载


Logspout with GELF adapter

This image contains Logspout which is compiled with GELF adapter so you can forward Docker logs in GELF format using gelf://hostname:port as the Logspout command.

Usage

Always read the official instructions first. This image should work the same way. Just use gelf as the protocol scheme.

Remember to set the hostname of the container to something meaningfull, because that gets set as the source of the GELF message.

CLI example

docker run -d --name=logspout --restart=unless-stopped -h $(hostname -f) -v /var/run/docker.sock:/var/run/docker.sock vincit/logspout-gelf gelf://my.log.server:12201

Docker Compose example

You could use this image with the following docker-compose file:

  1. version: '2'
  2. services:
  3. logspout:
  4. image: vincit/logspout-gelf
  5. hostname: my.message.source
  6. volumes:
  7. - /var/run/docker.sock:/var/run/docker.sock
  8. command: gelf://my.log.server:12201
  9. restart: unless-stopped

Disclaimer

This image is provided as-is and only with best effort. We try to update this image with the latest Logspout stable version.