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 ¶
func New(log log.Logger, c *Config) (integrations.Integration, error)
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 ¶
InstanceKey returns the hostname:port of the Consul server.
func (*Config) NewIntegration ¶
func (c *Config) NewIntegration(l log.Logger) (integrations.Integration, error)
NewIntegration converts the config into an instance of an integration.
func (*Config) UnmarshalYAML ¶
UnmarshalYAML implements yaml.Unmarshaler for Config.
Click to show internal directories.
Click to hide internal directories.