Documentation ¶
Overview ¶
Package docker is an observer that watches a docker daemon and reports container ports as service endpoints.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfigLabels ¶
func GetConfigLabels(labels map[string]string) map[ContPort]*LabelConfig
GetConfigLabels converts a set of docker labels into configs organized based on the port
Types ¶
type Config ¶
type Config struct { config.ObserverConfig DockerURL string `yaml:"dockerURL" default:"unix:///var/run/docker.sock"` // A mapping of container label names to dimension names that will get // applied to the metrics of all discovered services. The corresponding // label values will become the dimension values for the mapped name. E.g. // `io.kubernetes.container.name: container_spec_name` would result in a // dimension called `container_spec_name` that has the value of the // `io.kubernetes.container.name` container label. LabelsToDimensions map[string]string `yaml:"labelsToDimensions"` // If true, the "Config.Hostname" field (if present) of the docker // container will be used as the discovered host that is used to configure // monitors. If false or if no hostname is configured, the field // `NetworkSettings.IPAddress` is used instead. UseHostnameIfPresent bool `yaml:"useHostnameIfPresent"` // If true, the observer will configure monitors for matching container endpoints // using the host bound ip and port. This is useful if containers exist that are not // accessible to an instance of the agent running outside of the docker network stack. UseHostBindings bool `yaml:"useHostBindings" default:"false"` // If true, the observer will ignore discovered container endpoints that are not bound // to host ports. This is useful if containers exist that are not accessible // to an instance of the agent running outside of the docker network stack. IgnoreNonHostBindings bool `yaml:"ignoreNonHostBindings" default:"false"` }
Config specific to the Docker observer
type Docker ¶
type Docker struct {
// contains filtered or unexported fields
}
Docker observer plugin
type LabelConfig ¶
LabelConfig contains type and other configurations of a monitor
Click to show internal directories.
Click to hide internal directories.