Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(processors.aws_ec2): Allow to use instance metadata #15795

Merged
merged 5 commits into from
Sep 5, 2024

Conversation

srebhan
Copy link
Member

@srebhan srebhan commented Aug 30, 2024

Summary

Allow to use instance metadata to annotate metrics according to https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html.

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #15789

@telegraf-tiger telegraf-tiger bot added feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/processor labels Aug 30, 2024
@srebhan srebhan self-assigned this Aug 30, 2024
@telegraf-tiger
Copy link
Contributor

telegraf-tiger bot commented Sep 4, 2024

@srebhan srebhan added area/aws AWS plugins including cloudwatch, ecs, kinesis ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. labels Sep 4, 2024
@srebhan srebhan assigned DStrand1 and unassigned srebhan Sep 4, 2024
@DStrand1 DStrand1 merged commit 895f96f into influxdata:master Sep 5, 2024
27 checks passed
@github-actions github-actions bot added this to the v1.32.0 milestone Sep 5, 2024
@kirillmandrygin
Copy link

Hi @srebhan ! It is working good but I have two issues:

  1. Error when I run telegraf with --test:
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x740411b]

goroutine 109 [running]:
github.com/influxdata/telegraf/plugins/processors/aws_ec2.(*AwsEc2Processor).Stop(0xc00252e9c0?)
	/go/src/github.com/influxdata/telegraf/plugins/processors/aws_ec2/ec2.go:166 +0x3b
github.com/influxdata/telegraf/models.(*RunningProcessor).Stop(...)
	/go/src/github.com/influxdata/telegraf/models/running_processor.go:115
github.com/influxdata/telegraf/agent.(*Agent).runProcessors.func1(0xc001fec0c0)
	/go/src/github.com/influxdata/telegraf/agent/agent.go:666 +0x172
created by github.com/influxdata/telegraf/agent.(*Agent).runProcessors in goroutine 14
	/go/src/github.com/influxdata/telegraf/agent/agent.go:656 +0x3e
  1. Metadata tag added with slash (for example: test_metric{/Name="test-instance"}), is this expected behaviour?

@srebhan
Copy link
Member Author

srebhan commented Sep 16, 2024

@kirillmandrygin can you please open an issue with the information of your previous post and assign it to me or let me know the issue number!?!

@kirillmandrygin kirillmandrygin mentioned this pull request Sep 17, 2024
@kirillmandrygin
Copy link

@srebhan #15906

asaharn pushed a commit to asaharn/telegraf that referenced this pull request Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/aws AWS plugins including cloudwatch, ecs, kinesis feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/processor ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Retrieve AWS EC2 tags using instance metadata
3 participants