heka_docker

package module
v0.0.0-...-57976a2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2014 License: MPL-2.0 Imports: 12 Imported by: 0

README

Deprecated!

This plugin has been merged into Heka core under the name DockerLogInput. Just use that instead :-)

heka-docker

Docker input plugin for Mozilla Heka. Heavily based on progrium/logspout and victorcoder/heka-redis.

The plugin connects to the Docker socket, pulls all log messages (stdout/stderr) from all running containers and converts them into Heka messages.

Usage

See Building hekad with External Plugins for compiling in plugins.

[DockerInput]
endpoint = "unix:///var/run/docker.sock"

[ESJsonEncoder]

[debug]
type = "LogOutput"
message_matcher = "Type == 'docker-container'"
encoder = "ESJsonEncoder"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttachEvent

type AttachEvent struct {
	Type string
	ID   string
	Name string
}

type AttachManager

type AttachManager struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewAttachManager

func NewAttachManager(client *docker.Client) *AttachManager

func (*AttachManager) Get

func (m *AttachManager) Get(id string) *LogPump

func (*AttachManager) Listen

func (m *AttachManager) Listen(source *Source, logstream chan *Log, closer <-chan bool)

type DockerInput

type DockerInput struct {
	// contains filtered or unexported fields
}

func (*DockerInput) ConfigStruct

func (di *DockerInput) ConfigStruct() interface{}

func (*DockerInput) Init

func (di *DockerInput) Init(config interface{}) error

func (*DockerInput) Run

func (*DockerInput) Stop

func (di *DockerInput) Stop()

type DockerInputConfig

type DockerInputConfig struct {
	Endpoint    string `toml:"endpoint"`
	DecoderName string `toml:"decoder"`
}

type Log

type Log struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	Type string `json:"type"`
	Data string `json:"data"`
}

type LogPump

type LogPump struct {
	sync.Mutex
	ID   string
	Name string
	// contains filtered or unexported fields
}

func NewLogPump

func NewLogPump(stdout, stderr io.Reader, id, name string) *LogPump

func (*LogPump) AddListener

func (o *LogPump) AddListener(ch chan *Log)

func (*LogPump) RemoveListener

func (o *LogPump) RemoveListener(ch chan *Log)

type Source

type Source struct {
	ID     string   `json:"id,omitempty"`
	Name   string   `json:"name,omitempty"`
	Filter string   `json:"filter,omitempty"`
	Types  []string `json:"types,omitempty"`
}

func (*Source) All

func (s *Source) All() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL