Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SDCheckInterval = flag.Duration("promscrape.nomadSDCheckInterval", 30*time.Second, "Interval for checking for changes in Nomad. "+
"This works only if nomad_sd_configs is configured in '-promscrape.config' file. "+
"See https://docs.victoriametrics.com/sd_configs.html#nomad_sd_configs for details")
SDCheckInterval is check interval for Nomad service discovery.
Functions ¶
This section is empty.
Types ¶
type SDConfig ¶
type SDConfig struct { Server string `yaml:"server,omitempty"` Namespace string `yaml:"namespace,omitempty"` // RefreshInterval time.Duration `yaml:"refresh_interval"` // refresh_interval is obtained from `-promscrape.nomadSDCheckInterval` command-line option. Region string `yaml:"region,omitempty"` TagSeparator *string `yaml:"tag_separator,omitempty"` AllowStale *bool `yaml:"allow_stale,omitempty"` HTTPClientConfig promauth.HTTPClientConfig `yaml:",inline"` ProxyURL *proxy.URL `yaml:"proxy_url,omitempty"` ProxyClientConfig promauth.ProxyClientConfig `yaml:",inline"` }
SDConfig represents service discovery config for Nomad.
See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#nomad_sd_config
type Service ¶
type Service struct { ID string `json:"ID"` ServiceName string `json:"ServiceName"` Namespace string `json:"Namespace"` NodeID string `json:"NodeID"` Datacenter string `json:"Datacenter"` JobID string `json:"JobID"` AllocID string `json:"AllocID"` Tags []string `json:"Tags"` Address string `json:"Address"` Port int `json:"Port"` }
Service is Nomad service. See https://developer.hashicorp.com/nomad/api-docs/services#list-services
type ServiceList ¶
type ServiceList struct { Namespace string `json:"Namespace"` Services []struct { ServiceName string `json:"ServiceName"` Tags []string `json:"Tags"` } `json:"Services"` }
ServiceList is a list of Nomad services. See https://developer.hashicorp.com/nomad/api-docs/services#list-services
Click to show internal directories.
Click to hide internal directories.