Documentation
¶
Index ¶
Constants ¶
View Source
const ( AttributeVolumeId = "VolumeId" ValueAppendDimensionVolumeId = "${aws:VolumeId}" )
View Source
const ( Ec2InstanceTagKeyASG = "aws:autoscaling:groupName" CWDimensionASG = "AutoScalingGroupName" )
Variables ¶
View Source
var ( ThrottleBackOffArray = []time.Duration{0, 1 * time.Minute, 3 * time.Minute} // backoff retry for ec2 describe instances API call. Assuming the throttle limit is 20 per second. 10 mins allow 12000 API calls. BackoffSleepArray = []time.Duration{0, 1 * time.Minute, 1 * time.Minute, 3 * time.Minute, 3 * time.Minute, 3 * time.Minute, 10 * time.Minute} // backoff retry for ec2 describe instances API call. Assuming the throttle limit is 20 per second. 10 mins allow 12000 API calls. )
View Source
var SupportedAppendDimensions = map[string]string{
"AutoScalingGroupName": "${aws:AutoScalingGroupName}",
"ImageId": "${aws:ImageId}",
"InstanceId": "${aws:InstanceId}",
"InstanceType": "${aws:InstanceType}",
}
View Source
var (
TypeStr, _ = component.NewType("ec2tagger")
)
Functions ¶
func NewFactory ¶ added in v1.300025.0
Types ¶
type Config ¶ added in v1.300025.0
type Config struct {
RefreshIntervalSeconds time.Duration `mapstructure:"refresh_interval_seconds"`
EC2MetadataTags []string `mapstructure:"ec2_metadata_tags"`
EC2InstanceTagKeys []string `mapstructure:"ec2_instance_tag_keys"`
EBSDeviceKeys []string `mapstructure:"ebs_device_keys,omitempty"`
//The tag key in the metrics for disk device
DiskDeviceTagKey string `mapstructure:"disk_device_tag_key,omitempty"`
// unlike other AWS plugins, this one determines the region from ec2 metadata not user configuration
AccessKey string `mapstructure:"access_key,omitempty"`
SecretKey string `mapstructure:"secret_key,omitempty"`
RoleARN string `mapstructure:"role_arn,omitempty"`
Profile string `mapstructure:"profile,omitempty"`
Filename string `mapstructure:"shared_credential_file,omitempty"`
Token string `mapstructure:"token,omitempty"`
IMDSRetries int `mapstructure:"imds_retries,omitempty"`
MiddlewareID *component.ID `mapstructure:"middleware,omitempty"`
}
type Tagger ¶
type Tagger struct {
*Config
Configurer *awsmiddleware.Configurer
sync.RWMutex //to protect ec2TagCache
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.