Documentation ¶
Index ¶
- Variables
- type AvailabilityZone
- type AvailabilityZoneInfo
- type AvailabilityZonesResponse
- type Instance
- type InstanceSet
- type InstanceState
- type InstancesResponse
- type Ipv6AddressesSet
- type NetworkInterface
- type NetworkInterfaceSet
- type Placement
- type Reservation
- type ReservationSet
- type SDConfig
- type Tag
- type TagSet
Constants ¶
This section is empty.
Variables ¶
var SDCheckInterval = flag.Duration("promscrape.ec2SDCheckInterval", time.Minute, "Interval for checking for changes in ec2. "+
"This works only if ec2_sd_configs is configured in '-promscrape.config' file. "+
"See https://docs.victoriametrics.com/sd_configs.html#ec2_sd_configs for details")
SDCheckInterval defines interval for targets refresh.
Functions ¶
This section is empty.
Types ¶
type AvailabilityZone ¶ added in v1.64.0
AvailabilityZone represents availabilityZone for https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_AvailabilityZone.html
type AvailabilityZoneInfo ¶ added in v1.64.0
type AvailabilityZoneInfo struct {
Items []AvailabilityZone `xml:"item"`
}
AvailabilityZoneInfo represents availabilityZoneInfo for https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeAvailabilityZones.html
type AvailabilityZonesResponse ¶ added in v1.64.0
type AvailabilityZonesResponse struct {
AvailabilityZoneInfo AvailabilityZoneInfo `xml:"availabilityZoneInfo"`
}
AvailabilityZonesResponse represents the response for https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeAvailabilityZones.html
type Instance ¶
type Instance struct { PrivateIPAddress string `xml:"privateIpAddress"` Architecture string `xml:"architecture"` Placement Placement `xml:"placement"` ImageID string `xml:"imageId"` ID string `xml:"instanceId"` Lifecycle string `xml:"instanceLifecycle"` State InstanceState `xml:"instanceState"` Type string `xml:"instanceType"` Platform string `xml:"platform"` SubnetID string `xml:"subnetId"` PrivateDNSName string `xml:"privateDnsName"` PublicDNSName string `xml:"dnsName"` PublicIPAddress string `xml:"ipAddress"` VPCID string `xml:"vpcId"` NetworkInterfaceSet NetworkInterfaceSet `xml:"networkInterfaceSet"` TagSet TagSet `xml:"tagSet"` }
Instance represents Instance from https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_Instance.html
type InstanceSet ¶
type InstanceSet struct {
Items []Instance `xml:"item"`
}
InstanceSet represents InstanceSet from https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_Reservation.html
type InstanceState ¶
type InstanceState struct {
Name string `xml:"name"`
}
InstanceState represents InstanceState from https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_InstanceState.html
type InstancesResponse ¶
type InstancesResponse struct { ReservationSet ReservationSet `xml:"reservationSet"` NextPageToken string `xml:"nextToken"` }
InstancesResponse represents response to https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html
type Ipv6AddressesSet ¶ added in v1.48.0
type Ipv6AddressesSet struct {
Items []string `xml:"item"`
}
Ipv6AddressesSet represents ipv6AddressesSet from https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_InstanceNetworkInterface.html
type NetworkInterface ¶
type NetworkInterface struct { SubnetID string `xml:"subnetId"` IPv6AddressesSet Ipv6AddressesSet `xml:"ipv6AddressesSet"` }
NetworkInterface represents NetworkInterface from https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_InstanceNetworkInterface.html
type NetworkInterfaceSet ¶
type NetworkInterfaceSet struct {
Items []NetworkInterface `xml:"item"`
}
NetworkInterfaceSet represents NetworkInterfaceSet from https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_Instance.html
type Placement ¶
type Placement struct {
AvailabilityZone string `xml:"availabilityZone"`
}
Placement represents Placement from https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_Placement.html
type Reservation ¶
type Reservation struct { OwnerID string `xml:"ownerId"` InstanceSet InstanceSet `xml:"instancesSet"` }
Reservation represents Reservation from https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_Reservation.html
type ReservationSet ¶
type ReservationSet struct {
Items []Reservation `xml:"item"`
}
ReservationSet represetns ReservationSet from https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html
type SDConfig ¶
type SDConfig struct { Region string `yaml:"region,omitempty"` Endpoint string `yaml:"endpoint,omitempty"` STSEndpoint string `yaml:"sts_endpoint,omitempty"` AccessKey string `yaml:"access_key,omitempty"` SecretKey *promauth.Secret `yaml:"secret_key,omitempty"` // TODO add support for Profile, not working atm // Profile string `yaml:"profile,omitempty"` RoleARN string `yaml:"role_arn,omitempty"` // RefreshInterval time.Duration `yaml:"refresh_interval"` // refresh_interval is obtained from `-promscrape.ec2SDCheckInterval` command-line option. Port *int `yaml:"port,omitempty"` InstanceFilters []awsapi.Filter `yaml:"filters,omitempty"` AZFilters []awsapi.Filter `yaml:"az_filters,omitempty"` }
SDConfig represents service discovery config for ec2.
See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#ec2_sd_config
type Tag ¶
Tag represents Tag from https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_Tag.html
type TagSet ¶
type TagSet struct {
Items []Tag `xml:"item"`
}
TagSet represents TagSet from https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_Instance.html