docker

package
v5.6.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2017 License: Apache-2.0 Imports: 8 Imported by: 1,447

Documentation

Overview

Package docker is a Metricbeat module that contains MetricSets.

Index

Constants

This section is empty.

Variables

View Source
var HostParser = parse.URLHostParserBuilder{DefaultScheme: "tcp"}.Build()

Functions

func DeDotLabels

func DeDotLabels(labels map[string]string) common.MapStr

DeDotLabels returns a new common.MapStr containing a copy of the labels where the dots in each label name have been changed to an underscore.

func ExtractContainerName

func ExtractContainerName(names []string) string

func NewDockerClient

func NewDockerClient(endpoint string, config Config) (*docker.Client, error)

func NewModule

func NewModule(base mb.BaseModule) (mb.Module, error)

Types

type Config

type Config struct {
	TLS *TLSConfig `config:"ssl"`
}

type Container

type Container struct {
	ID     string
	Name   string
	Labels common.MapStr
}

func NewContainer

func NewContainer(container *docker.APIContainers) *Container

func (*Container) ToMapStr

func (c *Container) ToMapStr() common.MapStr

type Stat

type Stat struct {
	Container docker.APIContainers
	Stats     docker.Stats
}

func FetchStats

func FetchStats(client *docker.Client, timeout time.Duration) ([]Stat, error)

FetchStats returns a list of running containers with all related stats inside

type TLSConfig

type TLSConfig struct {
	Enabled     *bool  `config:"enabled"`
	CA          string `config:"certificate_authority"`
	Certificate string `config:"certificate"`
	Key         string `config:"key"`
}

func (*TLSConfig) IsEnabled

func (c *TLSConfig) IsEnabled() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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