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

[util] Incorporating security-groups into tags collected from ec2 #1951

Merged
merged 1 commit into from
Jan 11, 2016

Conversation

JohnLZeller
Copy link
Contributor

Looks like the agent pulls AWS host tags, but doesn't pull security-groups. Additionally, it doesn't look like there is a good way to grab security group ids from EC2, however we do have access to the security group names. The fix to apply here is simply to make sure we add that to the tags collected as security-group-name:<name>.

@JohnLZeller
Copy link
Contributor Author

@tmichelet any opinion on whether or not it's a good idea to add this here?

(internal) https://trello.com/c/bHtGDDmS/35-agent-not-pulling-aws-host-tags

@tmichelet
Copy link
Contributor

I think that makes sense for this use case

@tmichelet
Copy link
Contributor

reading the doc, it seems like from within a VPC, when people update a security group this metadata won't be updated:

The names of the security groups applied to the instance.

After launch, you can only changes the security groups of instances running in a VPC. Such changes are reflected here and in network/interfaces/macs/mac/security-groups.

Is that a use case we want to handle? if not, 👍 good to merge, otherwise we'd need some more work

@tmichelet
Copy link
Contributor

Also, this will churn all our contexts, is this something we want or do we want to have an option in the config for this tag?

@JohnLZeller
Copy link
Contributor Author

Updated this PR by adding if EC2.metadata.get('security-groups'): to ensure we catch a situation where metadata does not contain security-groups

@remh
Copy link

remh commented Dec 22, 2015

@tmichelet is this ready to be merged ? Should we add another feature flag in datadog.conf to avoid churning existing contexts ?

@remh remh added this to the 5.7.0 milestone Dec 22, 2015
@tmichelet
Copy link
Contributor

@remh cc @JohnLZeller yes I believe we should add another feature flag in datadog.conf.

@JohnLZeller
Copy link
Contributor Author

@tmichelet how's this?

@tmichelet
Copy link
Contributor

👍 good to merge

tmichelet added a commit that referenced this pull request Jan 11, 2016
[util] Incorporating security-groups into tags collected from ec2
@tmichelet tmichelet merged commit d0e8186 into master Jan 11, 2016
@JohnLZeller JohnLZeller deleted the zeller/ec2-tags branch January 11, 2016 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants