Documentation ¶
Overview ¶
SDConfig represents service discovery config for hetzner cloud and hetzner robot.
Index ¶
- Variables
- type HCloudDatacenter
- type HCloudDatacenterLocation
- type HCloudIPv4
- type HCloudIPv6
- type HCloudImage
- type HCloudMeta
- type HCloudNetwork
- type HCloudNetworksList
- type HCloudPagination
- type HCloudPrivateNet
- type HCloudPublicNet
- type HCloudServer
- type HCloudServerList
- type HCloudServerType
- type RobotServer
- type RobotServerEntry
- type RobotSubnet
- type SDConfig
Constants ¶
This section is empty.
Variables ¶
var SDCheckInterval = flag.Duration("promscrape.hetznerSDCheckInterval", time.Minute, "Interval for checking for changes in Hetzner API. "+
"This works only if hetzner_sd_configs is configured in '-promscrape.config' file. "+
"See https://docs.victoriametrics.com/sd_configs/#hetzner_sd_configs for details")
SDCheckInterval defines interval for targets refresh.
Functions ¶
This section is empty.
Types ¶
type HCloudDatacenter ¶
type HCloudDatacenter struct { Name string `json:"name"` Location HCloudDatacenterLocation `json:"location"` }
HCloudDatacenter represents the Hetzner datacenter.
type HCloudDatacenterLocation ¶
type HCloudDatacenterLocation struct { Name string `json:"name"` NetworkZone string `json:"network_zone"` }
HCloudDatacenterLocation represents the datacenter information.
type HCloudIPv4 ¶
type HCloudIPv4 struct {
IP string `json:"ip"`
}
HCloudIPv4 represents the IPv4 information.
type HCloudIPv6 ¶
type HCloudIPv6 struct {
IP string `json:"ip"`
}
HCloudIPv6 represents the IPv6 information.
type HCloudImage ¶
type HCloudImage struct { Name string `json:"name"` Description string `json:"description"` OsFlavor string `json:"os_flavor"` OsVersion string `json:"os_version"` }
HCloudImage represents the image information.
type HCloudMeta ¶
type HCloudMeta struct {
Pagination HCloudPagination `json:"pagination"`
}
HCloudMeta represents hetzner cloud meta-information.
type HCloudNetwork ¶
HCloudNetwork represents the hetzner cloud network information.
type HCloudNetworksList ¶
type HCloudNetworksList struct { Meta HCloudMeta `json:"meta"` Networks []HCloudNetwork `json:"networks"` }
HCloudNetworksList represents the hetzner cloud networks list.
type HCloudPagination ¶
type HCloudPagination struct {
NextPage int `json:"next_page"`
}
HCloudPagination represents hetzner cloud pagination information.
type HCloudPrivateNet ¶
HCloudPrivateNet represents the private network information.
type HCloudPublicNet ¶
type HCloudPublicNet struct { IPv4 HCloudIPv4 `json:"ipv4"` IPv6 HCloudIPv6 `json:"ipv6"` }
HCloudPublicNet represents the public network information.
type HCloudServer ¶
type HCloudServer struct { ID int `json:"id"` Name string `json:"name"` Status string `json:"status"` PublicNet HCloudPublicNet `json:"public_net"` PrivateNet []HCloudPrivateNet `json:"private_net"` ServerType HCloudServerType `json:"server_type"` Datacenter HCloudDatacenter `json:"datacenter"` Image *HCloudImage `json:"image"` Labels map[string]string `json:"labels"` }
HCloudServer represents the structure of server data.
type HCloudServerList ¶
type HCloudServerList struct { Meta HCloudMeta `json:"meta"` Servers []HCloudServer `json:"servers"` }
HCloudServerList represents a list of servers from Hetzner Cloud API.
type HCloudServerType ¶
type HCloudServerType struct { Name string `json:"name"` Cores int `json:"cores"` CPUType string `json:"cpu_type"` Memory float32 `json:"memory"` Disk int `json:"disk"` }
HCloudServerType represents the server type information.
type RobotServer ¶
type RobotServer struct { ServerIP string `json:"server_ip"` ServerIPV6 string `json:"server_ipv6_net"` ServerNumber int `json:"server_number"` ServerName string `json:"server_name"` DC string `json:"dc"` Status string `json:"status"` Product string `json:"product"` Canceled bool `json:"cancelled"` Subnet []RobotSubnet `json:"subnet"` }
RobotServer represents the structure of hetzner robot server data.
type RobotServerEntry ¶
type RobotServerEntry struct {
Server RobotServer `json:"server"`
}
RobotServerEntry represents a single server entry in hetzner robot server response.
type RobotSubnet ¶
RobotSubnet represents the structure of hetzner robot subnet data.
type SDConfig ¶
type SDConfig struct { Role string `yaml:"role"` Port *int `yaml:"port,omitempty"` HTTPClientConfig promauth.HTTPClientConfig `yaml:",inline"` ProxyClientConfig promauth.ProxyClientConfig `yaml:",inline"` ProxyURL *proxy.URL `yaml:"proxy_url,omitempty"` }
SDConfig represents service discovery config for Hetzner.
See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#hetzner_sd_config