Skip to content

Commit

Permalink
Specify metadata path for instance tags
Browse files Browse the repository at this point in the history
  • Loading branch information
srebhan committed Sep 2, 2024
1 parent 536c29b commit 7c70114
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/processors/aws_ec2/ec2.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ func (r *AwsEc2Processor) lookupMetadataTags(metric telegraf.Metric) telegraf.Me
return metric
}

metadata, err := r.imdsClient.GetMetadata(ctx, &imds.GetMetadataInput{})
metadata, err := r.imdsClient.GetMetadata(ctx, &imds.GetMetadataInput{Path: "tags/instance"})
if err != nil {
r.Log.Errorf("Error when getting metadata: %v", err)
return metric
Expand Down

0 comments on commit 7c70114

Please sign in to comment.