Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsulConfig ¶
type ConsulConfig struct {
// Address of the Consul agent. The address must contain a hostname or an IP address
// and optionally a port (format: "host:port").
Enabled bool `toml:"enabled"`
Agent string `toml:"agent"`
Queries []*ConsulQuery `toml:"query"`
Catalog *api.Catalog `toml:"-"`
}
type ConsulQuery ¶
type ConsulQuery struct {
// A name of the searched services (not ID)
ServiceName string `toml:"name"`
// A tag of the searched services
ServiceTag string `toml:"tag"`
// A DC of the searched services
ServiceDc string `toml:"dc"`
// A template URL of the Prometheus gathering interface. The hostname part
// of the URL will be replaced by discovered address and port.
ServiceURL string `toml:"url"`
// Extra tags to add to metrics found in Consul
ServiceExtraTags map[string]string `toml:"tags"`
// contains filtered or unexported fields
}
One Consul service discovery query
type Instance ¶
type Instance struct {
config.InstanceConfig
URLs []string `toml:"urls"`
ConsulConfig ConsulConfig `toml:"consul"`
NamePrefix string `toml:"name_prefix"`
BearerTokenString string `toml:"bearer_token_string"`
BearerTokeFile string `toml:"bearer_token_file"`
Username string `toml:"username"`
Password string `toml:"password"`
Timeout config.Duration `toml:"timeout"`
IgnoreMetrics []string `toml:"ignore_metrics"`
IgnoreLabelKeys []string `toml:"ignore_label_keys"`
Headers []string `toml:"headers"`
config.UrlLabel
tls.ClientConfig
// contains filtered or unexported fields
}
func (*Instance) Gather ¶
func (ins *Instance) Gather(slist *types.SampleList)
func (*Instance) InitConsulClient ¶
func (*Instance) UrlsFromConsul ¶
type Prometheus ¶
type Prometheus struct {
config.PluginConfig
Instances []*Instance `toml:"instances"`
}
func (*Prometheus) Clone ¶
func (p *Prometheus) Clone() inputs.Input
func (*Prometheus) GetInstances ¶
func (p *Prometheus) GetInstances() []inputs.Instance
func (*Prometheus) Name ¶
func (p *Prometheus) Name() string
Click to show internal directories.
Click to hide internal directories.