docker

package
v0.0.0-...-7d8b796 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SDCheckInterval = flag.Duration("promscrape.dockerSDCheckInterval", 30*time.Second, "Interval for checking for changes in docker. "+
	"This works only if docker_sd_configs is configured in '-promscrape.config' file. "+
	"See https://docs.victoriametrics.com/sd_configs.html#docker_sd_configs for details")

SDCheckInterval defines interval for docker targets refresh.

Functions

This section is empty.

Types

type Filter

type Filter struct {
	Name   string   `yaml:"name"`
	Values []string `yaml:"values"`
}

Filter is a filter, which can be passed to SDConfig.

type SDConfig

type SDConfig struct {
	Host               string   `yaml:"host"`
	Port               int      `yaml:"port,omitempty"`
	Filters            []Filter `yaml:"filters,omitempty"`
	HostNetworkingHost string   `yaml:"host_networking_host,omitempty"`

	HTTPClientConfig  promauth.HTTPClientConfig  `yaml:",inline"`
	ProxyURL          *proxy.URL                 `yaml:"proxy_url,omitempty"`
	ProxyClientConfig promauth.ProxyClientConfig `yaml:",inline"`
}

SDConfig defines the `docker_sd` section for Docker based discovery

See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#docker_sd_config

func (*SDConfig) GetLabels

func (sdc *SDConfig) GetLabels(baseDir string) ([]*promutils.Labels, error)

GetLabels returns docker labels according to sdc.

func (*SDConfig) MustStop

func (sdc *SDConfig) MustStop()

MustStop stops further usage for sdc.

Jump to

Keyboard shortcuts

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