Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SDCheckInterval = flag.Duration("promscrape.consulSDCheckInterval", 30*time.Second, "Interval for checking for changes in Consul. "+
"This works only if consul_sd_configs is configured in '-promscrape.config' file. "+
"See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#consul_sd_config for details")
SDCheckInterval is check interval for Consul service discovery.
Functions ¶
This section is empty.
Types ¶
type AgentConfig ¶
type AgentConfig struct {
Datacenter string
}
AgentConfig is Consul agent config.
type Check ¶
Check is Consul check.
See https://www.consul.io/api/health.html#list-nodes-for-service
type Node ¶
type Node struct { Address string Datacenter string Node string Meta map[string]string TaggedAddresses map[string]string }
Node is Consul node.
See https://www.consul.io/api/health.html#list-nodes-for-service
type SDConfig ¶
type SDConfig struct { Server string `yaml:"server,omitempty"` Token *promauth.Secret `yaml:"token"` Datacenter string `yaml:"datacenter"` // Namespace only supported at enterprise consul. // https://www.consul.io/docs/enterprise/namespaces Namespace string `yaml:"namespace,omitempty"` Scheme string `yaml:"scheme,omitempty"` Username string `yaml:"username"` Password *promauth.Secret `yaml:"password"` HTTPClientConfig promauth.HTTPClientConfig `yaml:",inline"` ProxyURL *proxy.URL `yaml:"proxy_url,omitempty"` ProxyClientConfig promauth.ProxyClientConfig `yaml:",inline"` Services []string `yaml:"services,omitempty"` Tags []string `yaml:"tags,omitempty"` NodeMeta map[string]string `yaml:"node_meta,omitempty"` TagSeparator *string `yaml:"tag_separator,omitempty"` AllowStale *bool `yaml:"allow_stale,omitempty"` }
SDConfig represents service discovery config for Consul.
See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#consul_sd_config
type Service ¶
type Service struct { ID string Service string Address string Namespace string Port int Tags []string Meta map[string]string }
Service is Consul service.
See https://www.consul.io/api/health.html#list-nodes-for-service
type ServiceNode ¶
ServiceNode is Consul service node.
See https://www.consul.io/api/health.html#list-nodes-for-service
Click to show internal directories.
Click to hide internal directories.