Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var SDCheckInterval = flag.Duration("promscrape.gceSDCheckInterval", time.Minute, "Interval for checking for changes in gce. "+
"This works only if gce_sd_configs is configured in '-promscrape.config' file. "+
"See https://docs.victoriametrics.com/sd_configs/#gce_sd_configs for details")
SDCheckInterval defines interval for targets refresh.
Functions ¶
This section is empty.
Types ¶
type AccessConfig ¶
AccessConfig is access config from https://cloud.google.com/compute/docs/reference/rest/v1/instances/list
type Instance ¶
type Instance struct { ID string `json:"id"` Name string Status string MachineType string Zone string NetworkInterfaces []NetworkInterface Tags TagList Metadata MetadataList Labels *promutils.Labels }
Instance is instance from https://cloud.google.com/compute/docs/reference/rest/v1/instances/list
type InstanceList ¶
InstanceList is response to https://cloud.google.com/compute/docs/reference/rest/v1/instances/list
type MetadataEntry ¶
MetadataEntry is a single entry from metadata
type MetadataList ¶
type MetadataList struct {
Items []MetadataEntry
}
MetadataList is metadataList from https://cloud.google.com/compute/docs/reference/rest/v1/instances/list
type NetworkInterface ¶
type NetworkInterface struct { Name string Network string Subnetwork string NetworkIP string AccessConfigs []AccessConfig }
NetworkInterface is network interface from https://cloud.google.com/compute/docs/reference/rest/v1/instances/list
type SDConfig ¶
type SDConfig struct { Project string `yaml:"project"` Zone ZoneYAML `yaml:"zone"` Filter string `yaml:"filter,omitempty"` // RefreshInterval time.Duration `yaml:"refresh_interval"` // refresh_interval is obtained from `-promscrape.gceSDCheckInterval` command-line option. Port *int `yaml:"port,omitempty"` TagSeparator *string `yaml:"tag_separator,omitempty"` }
SDConfig represents service discovery config for gce.
See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#gce_sd_config
type TagList ¶
type TagList struct {
Items []string
}
TagList is tag list from https://cloud.google.com/compute/docs/reference/rest/v1/instances/list
type Zone ¶
type Zone struct {
Name string
}
Zone is zone from https://cloud.google.com/compute/docs/reference/rest/v1/zones/list
type ZoneList ¶
ZoneList is response to https://cloud.google.com/compute/docs/reference/rest/v1/zones/list
type ZoneYAML ¶
type ZoneYAML struct {
Zones []string
}
ZoneYAML holds info about zones.
func (ZoneYAML) MarshalYAML ¶
MarshalYAML implements yaml.Marshaler