Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SDCheckInterval = flag.Duration("promscrape.vultrSDCheckInterval", 30*time.Second, "Interval for checking for changes in Vultr. "+
"This works only if vultr_sd_configs is configured in '-promscrape.config' file. "+
"See https://docs.victoriametrics.com/sd_configs.html#vultr_sd_configs for details")
SDCheckInterval defines interval for docker targets refresh.
Functions ¶
This section is empty.
Types ¶
type Instance ¶
type Instance struct { ID string `json:"id"` Os string `json:"os"` RAM int `json:"ram"` Disk int `json:"disk"` MainIP string `json:"main_ip"` VCPUCount int `json:"vcpu_count"` Region string `json:"region"` ServerStatus string `json:"server_status"` AllowedBandwidth int `json:"allowed_bandwidth"` V6MainIP string `json:"v6_main_ip"` Hostname string `json:"hostname"` Label string `json:"label"` InternalIP string `json:"internal_ip"` OsID int `json:"os_id"` Features []string `json:"features"` Plan string `json:"plan"` Tags []string `json:"tags"` }
Instance represents Vultr Instance (VPS). See: https://github.com/vultr/govultr/blob/5125e02e715ae6eb3ce854f0e7116c7ce545a710/instance.go#L81
type ListInstanceResponse ¶
type ListInstanceResponse struct { Instances []Instance `json:"instances"` Meta *Meta `json:"Meta"` }
ListInstanceResponse is the response structure of Vultr ListInstance API.
type SDConfig ¶
type SDConfig struct { // API query params for filtering. All of them are optional. // See: https://www.vultr.com/api/#tag/instances/operation/list-instances Label string `yaml:"label,omitempty"` MainIP string `yaml:"main_ip,omitempty"` Region string `yaml:"region,omitempty"` FirewallGroupID string `yaml:"firewall_group_id,omitempty"` Hostname string `yaml:"hostname,omitempty"` // The port to scrape metrics from. Default 80. Port int `yaml:"port"` // General HTTP / Auth configs. HTTPClientConfig promauth.HTTPClientConfig `yaml:",inline"` ProxyURL *proxy.URL `yaml:"proxy_url,omitempty"` ProxyClientConfig promauth.ProxyClientConfig `yaml:",inline"` }
SDConfig represents service discovery config for Vultr. See: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#vultr_sd_config Additional query params are supported, while Prometheus only supports `Port` and HTTP auth.
Click to show internal directories.
Click to hide internal directories.