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 ¶
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 ¶
func (c *Config) InstanceKey(agentKey string) (string, error)
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 ¶
func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements yaml.Unmarshaler for Config.
Click to show internal directories.
Click to hide internal directories.