Agent not honoring DD_COLLECT_EC2_TAGS when ec2 integration is turned on
Additional environment details (Operating System, Cloud provider, etc): datadog/agent:6.11.3 datadog/cluster-agent:1.3.1
Steps to reproduce the issue:
- Set DD_COLLECT_EC2_TAGS: false
- Turn on ec2 integration https://docs.datadoghq.com/integrations/amazon_ec2/
- dd-agent still collects ec2 tags in metrics
Describe the results you received: Metrics have ec2 tags Describe the results you expected: Metrics should not have ec2 tags
Additional information you deem important (e.g. issue happens only occasionally):
DD agent should honor the DD_COLLECT_EC2_TAGS rather than requiring users to modify the IAM policy to disable ec2:DescribeInstances in order to stop collecting ec2 tags
Same problem. We are trying to use dogstatsd but the custom metrics count just exploded because of this. (version 7.21.0 BTW)
I had a support ticket open about our events having a bunch of garbage tags for the past few months. Forgot about this known issue. I have linked support to it. Thank you @semoac for commenting, this might help get a solution actually rolling.
@JohnlNguyen can you elaborate on where you did the "modify the IAM policy to disable ec2:DescribeInstances" (instance policy ? .. or permissions for the agent ... or something else ?) I'm trying to do the same to fix the same issue π
Is there any update from anyone at DataDog on this? I have tried to cover this with support a number of times but have not had any luck getting a solution.
Is there any update from anyone at DataDog on this?
Sort of. I apologize for not circling back here to comment on the issue about what a DataDog lead solutions engineer told me in Jan 2021 before closing out my ticket.
I'm reaching out to follow up on this ticket thread, after a period of inactivity. Firstly, I'd like to apologize for the silence on our end here. After performing an audit on our side and reviewing your case in more detail, I can see that this bug / issue has been triaged by our product and engineering teams to be worked on, but I don't yet have a firm ETA for when this will be completed.
So, it's in their backlog but not roadmapped, most likely. I won't share the name of that lead solutions engineer publicly for their privacy's sake. What I will do is make a follow-up ticket saying "hey, don't forget about us!" Maybe the fact that my past self got far enough to get a lead solutions engineer involved will have more "weight" with them and they'll bump up the priority on fixing it... but IME every time I report a bug, it takes them years to fix it, if they fix it at all. Of course, I seem to only report the really tricky bugs that take sometimes weeks of discussion to get them to nail it down, so, take that with a grain of salt. I'm not trying to shame them too much, just a tiny bit π€
~I'm bad at remembering to follow up with GitHub threads that aren't active and showing up in my notifications a lot, so don't expect a response from me unless you ping me in a couple weeks. And definitely don't get your hopes up that I'll have good news. Nonetheless, I'm still going to try.~ Edit: good news, they replied basically immediately. Here is their response:
The team appreciates you reaching out about the issue. Please know the team is still working on your case regarding the issue in development as of today 3/31/23.
After performing an audit on our side and reviewing your case in more detail, I can see that this bug / issue is being triaged by our product and engineering teams , but I don't yet have a firm ETA for when this will be completed.
That being said, I'm going to close out this ticket thread for now, but if this is an urgent issue for you and your team please feel free to reply here and I'd be happy to discuss your case with our product / engineering teams in more detail.
So in other words, I would have to escalate it as an urgent issue to get faster/any progress. It's not urgent for me, so I don't want to lie to them. It's a bummer, but it seems like there's been no progress since over 2 years ago.
Thanks @2rs2ts appreciate the update, and I totally understand about missing notifications on old GitHub threads!
Invested time last Friday attempting to configure the settings correctly, but encountered issues even with the latest version of the agent.
What's puzzling is that in the host page, the tag is only configured in the AWS section, not in the Datadog section. However, tags are still being set in metrics/logs.
Hey, any updates on this issue?
Removing ec2:DescribeInstances is helping here but all the instance metrics are missing in Datadog because of this.
I want to monitor the disk usage of one of our instances, but I'm unable to do so because I've removed the ec2:DescribeInstances action from the policy.
@bunnybilou if you haven't opened a ticket with datadog support, please do so and mention this github issue. It's a real pain and I'm getting frustrated that it's still not fixed, too.
This issue has been automatically marked as stale because it has not had activity in the past 15 days.
It will be closed in 30 days if no further activity occurs. If this issue is still relevant, adding a comment will keep it open. Also, you can always reopen the issue if you missed the window.
Thank you for your contributions!
I cannot understate how much I loathe bots like the above. Bugs/flaws don't go away just because nobody has actively talked about them for years. Most projects don't like it when you reply with +1 constantly on issues...
Hi @2rs2ts,
Thank you for taking the time to share your feedback. We recently introduced a system to help manage long-standing issues through automated stale management. We understand this may have come as a surprise for some existing issues. We want to apologize if it felt that way. It was not our intent, and we want to reassure you that every issue is important to us and reviewed carefully. For your specific issue, weβre reviewing it to ensure the discussion progresses and receives the right level of attention. Thank you for helping improve the Datadog Agent.
β The Datadog Agent Team
Hey all!
Just to provide a bit more color here: DD_COLLECT_EC2_TAGS was originally implemented to have the Agent collect EC2 tags via IMDS if the AWS integration is not enabled (which also scrapes the tags). I can definitely understand the confusion, though, and we'll be looking into this a bit more to see if we should be coupling this collection so that if this option is disabled in the Agent it also disables collection in the AWS Integration.
Same problem. We are trying to use dogstatsd but the custom metrics count just exploded because of this. (version 7.21.0 BTW)
Since these tags are correlated with the host tag their inclusion shouldn't increase the cardinality of the metrics over the host tag itself. Maybe I'm missing something though? Have people seen an increase in cardinality due to these tags and can share more details?
I cannot understate how much I loathe bots like the above. Bugs/flaws don't go away just because nobody has actively talked about them for years. Most projects don't like it when you reply with +1 constantly on issues...
For sure, we are just starting to get an automated triage process in place but the intent is to label issues that have been validated and they won't require constant bumping to appease the stale bot. The primary intent is to close issues that are awaiting author response.
Also hi @2rs2ts π
Since these tags are correlated with the host tag their inclusion shouldn't increase the cardinality of the metrics over the host tag itself. Maybe I'm missing something though?
@jszwedko whilst you are probably right, I suspect that if any tags on the EC2 instance were to change over time then that would increase cardinality as presumably metrics would get enriched with the tags at that point in time. I haven't tested this.
For us, whilst cardinality is a concern, the issue is more the vast amount of clutter all those extra tags create in the Datadog UI. Whilst it might seem like a small thing it is slowing down engineers a tiny bit every day as they have to wade through a huge list trying to find the tags they care about.
It also makes it harder to manage the ingested tags for custom metrics, which impacts how easy it is to reduce metrics costs.
Since these tags are correlated with the host tag their inclusion shouldn't increase the cardinality of the metrics over the host tag itself. Maybe I'm missing something though?
@jszwedko whilst you are probably right, I suspect that if any tags on the EC2 instance were to change over time then that would increase cardinality as presumably metrics would get enriched with the tags at that point in time. I haven't tested this.
That's true, there is a short period of "tag churn" where the old tags are removed and the new tags added that can lead to temporary increases in cardinality.
For us, whilst cardinality is a concern, the issue is more the vast amount of clutter all those extra tags create in the Datadog UI. Whilst it might seem like a small thing it is slowing down engineers a tiny bit every day as they have to wade through a huge list trying to find the tags they care about.
It also makes it harder to manage the ingested tags for custom metrics, which impacts how easy it is to reduce metrics cost
For sure, I can understand that: that the extraneous tags clutter the interface and make it difficult to highlight the tags that you actually care about.
Thank you for taking the time to share your feedback. We recently introduced a system to help manage long-standing issues through automated stale management. We understand this may have come as a surprise for some existing issues. We want to apologize if it felt that way. It was not our intent, and we want to reassure you that every issue is important to us and reviewed carefully.
Appreciated, @chouetz. I get why people use bots like these. I just am very tired of my inbox being full of /remove-lifecycle stale for K8s issues, and many other such cases. It creates a maintenance burden for bug reports and feature requests that in aggregate exceeds the burden and waste of human lifespan compared to closing issues that are resolved (but were not properly linked such that they would auto-resolve when a PR was merged or whatever.) It inflicts that burden of bumping stuff for years, and having to clear your inbox full of these automated messages and people's replies to them, both on the users and on yourselves. Even worse, it also leads to situations where completely valid extant issues get swept under the rug because someone chose the wrong time to go on vacation. It would be better to do nothing at all than to use auto-close bots.
we'll be looking into this a bit more to see if we should be coupling this collection so that if this option is disabled in the Agent it also disables collection in the AWS Integration.
That would be excellent for things like Kubernetes. Thank you @jszwedko (also hello! It's been a while! π )