consul_exporter

package
v0.35.1 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package consul_exporter embeds https://github.com/prometheus/consul_exporter

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{
	Server:        "http://localhost:8500",
	Timeout:       500 * time.Millisecond,
	AllowStale:    true,
	KVFilter:      ".*",
	HealthSummary: true,
}

DefaultConfig holds the default settings for the consul_exporter integration.

Functions

func New

New creates a new consul_exporter integration. The integration scrapes metrics from a consul process.

Types

type Config

type Config struct {
	Server             string        `yaml:"server,omitempty"`
	CAFile             string        `yaml:"ca_file,omitempty"`
	CertFile           string        `yaml:"cert_file,omitempty"`
	KeyFile            string        `yaml:"key_file,omitempty"`
	ServerName         string        `yaml:"server_name,omitempty"`
	Timeout            time.Duration `yaml:"timeout,omitempty"`
	InsecureSkipVerify bool          `yaml:"insecure_skip_verify,omitempty"`
	RequestLimit       int           `yaml:"concurrent_request_limit,omitempty"`
	AllowStale         bool          `yaml:"allow_stale,omitempty"`
	RequireConsistent  bool          `yaml:"require_consistent,omitempty"`

	KVPrefix      string `yaml:"kv_prefix,omitempty"`
	KVFilter      string `yaml:"kv_filter,omitempty"`
	HealthSummary bool   `yaml:"generate_health_summary,omitempty"`
}

Config controls the consul_exporter integration.

func (*Config) InstanceKey added in v0.21.0

func (c *Config) InstanceKey(agentKey string) (string, error)

InstanceKey returns the hostname:port of the Consul server.

func (*Config) Name added in v0.10.0

func (c *Config) Name() string

Name returns the name of the integration.

func (*Config) NewIntegration added in v0.10.0

func (c *Config) NewIntegration(l log.Logger) (integrations.Integration, error)

NewIntegration converts the config into an instance of an integration.

func (*Config) UnmarshalYAML

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

UnmarshalYAML implements yaml.Unmarshaler for Config.

Jump to

Keyboard shortcuts

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