integrations

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2021 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultConfig = Config{
		ScrapeIntegrations:        true,
		IntegrationRestartBackoff: 5 * time.Second,
		UseHostnameLabel:          true,
		ReplaceInstanceLabel:      true,
	}
)

Functions

This section is empty.

Types

type Config

type Config struct {
	// Whether the Integration subsystem should be enabled.
	Enabled bool `yaml:"-"`

	// When true, scrapes metrics from integrations.
	ScrapeIntegrations bool `yaml:"scrape_integrations"`
	// When true, replaces the instance label with the agent hostname.
	ReplaceInstanceLabel bool `yaml:"replace_instance_label"`

	// DEPRECATED. When true, adds an agent_hostname label to all samples from integrations.
	// ReplaceInstanceLabel should be used instead.
	UseHostnameLabel bool `yaml:"use_hostname_label"`

	Agent             agent.Config              `yaml:"agent"`
	NodeExporter      node_exporter.Config      `yaml:"node_exporter"`
	ProcessExporter   process_exporter.Config   `yaml:"process_exporter"`
	MysqldExporter    mysqld_exporter.Config    `yaml:"mysqld_exporter"`
	RedisExporter     redis_exporter.Config     `yaml:"redis_exporter"`
	DnsmasqExporter   dnsmasq_exporter.Config   `yaml:"dnsmasq_exporter"`
	MemcachedExporter memcached_exporter.Config `yaml:"memcached_exporter"`
	PostgresExporter  postgres_exporter.Config  `yaml:"postgres_exporter"`
	StatsdExporter    statsd_exporter.Config    `yaml:"statsd_exporter"`
	ConsulExporter    consul_exporter.Config    `yaml:"consul_exporter"`

	// Extra labels to add for all integration samples
	Labels model.LabelSet `yaml:"labels"`

	// Prometheus RW configs to use for all integrations.
	PrometheusRemoteWrite []*config.RemoteWriteConfig `yaml:"prometheus_remote_write,omitempty"`

	IntegrationRestartBackoff time.Duration `yaml:"integration_restart_backoff,omitempty"`

	// ListenPort tells the integration Manager which port the Agent is
	// listening on for generating Prometheus instance configs.
	ListenPort *int `yaml:"-"`
}

Config holds the configuration for all integrations.

func (*Config) DefaultRelabelConfigs added in v0.7.0

func (c *Config) DefaultRelabelConfigs() ([]*relabel.Config, error)

DefaultRelabelConfigs returns the set of relabel configs that should be prepended to all RelabelConfigs for an integration.

func (*Config) UnmarshalYAML

func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements yaml.Unmarshaler for Config.

type Manager

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

Manager manages a set of integrations and runs them.

func NewManager

func NewManager(c Config, logger log.Logger, im instance.Manager) (*Manager, error)

NewManager creates a new integrations manager. NewManager must be given an InstanceManager which is responsible for accepting instance configs to scrape and send metrics from running integrations.

func (*Manager) Stop

func (m *Manager) Stop()

Stop stops the manager and all of its integrations.

func (*Manager) WireAPI

func (m *Manager) WireAPI(r *mux.Router) error

Directories

Path Synopsis
Package agent is an "example" integration that has very little functionality, but is still useful in practice.
Package agent is an "example" integration that has very little functionality, but is still useful in practice.
Package common implements a bare-bones Integration that can be used by exporters that have no logic associated with them.
Package common implements a bare-bones Integration that can be used by exporters that have no logic associated with them.
Package config provides common configuration structs shared among implementations of integrations.Integration.
Package config provides common configuration structs shared among implementations of integrations.Integration.
Package consul_exporter embeds https://github.com/prometheus/consul_exporter
Package consul_exporter embeds https://github.com/prometheus/consul_exporter
Package dnsmasq_exporter embeds https://github.com/google/dnsmasq_exporter
Package dnsmasq_exporter embeds https://github.com/google/dnsmasq_exporter
Package memcached_exporter embeds https://github.com/google/memcached_exporter
Package memcached_exporter embeds https://github.com/google/memcached_exporter
Package mysqld_exporter embeds https://github.com/prometheus/mysqld_exporter
Package mysqld_exporter embeds https://github.com/prometheus/mysqld_exporter
Package postgres_exporter embeds https://github.com/prometheus/postgres_exporter
Package postgres_exporter embeds https://github.com/prometheus/postgres_exporter
Package process_exporter embeds https://github.com/ncabatoff/process-exporter Package process_exporter embeds https://github.com/ncabatoff/process-exporter
Package process_exporter embeds https://github.com/ncabatoff/process-exporter Package process_exporter embeds https://github.com/ncabatoff/process-exporter
package redis_exporter embeds https://github.com/oliver006/redis_exporter
package redis_exporter embeds https://github.com/oliver006/redis_exporter
Package statsd_exporter embeds https://github.com/prometheus/statsd_exporter
Package statsd_exporter embeds https://github.com/prometheus/statsd_exporter

Jump to

Keyboard shortcuts

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