I have several fargate aws tasks in the environment. None of them have a host group configured. I'm trying to set --set-host-group inside my docker file, to make the deploy/run image with this information, but it's not working.
I made some tests, passing the parameter inside of entrypoint and inside of command (Tasks definition), none of them worked.
I spoke to chat and they told me it is not supported, or because I cannot set the host group of my AWS fargates tasks. Is correct?
If yes, does not have any workaround for this?
Solved! Go to Solution.
Setting host group in this case is not possible because the Oneagent is running in the container and not in full-stack.
We have a workaround that can help. You can use DT_CUSTOM_PROP environment variable to equal your host group. It will show on the processes, then you could use a auto tagging rule to propagate to the hosts.
Hope that helps.
I agree with the solution provided by Abraham, had this issue in the past and the HOST_GROUP/--set-host-group flag was not supported on docker container
Im pretty sure that was listed as one of the limitations in this list but I cannot see it anymore (I'm also talking with docs team to update it) https://www.dynatrace.com/support/help/shortlink/oneagent-docker#limitations
The workaround I used was DT_TAGS and DT_CUSTOM_PROP environment variables
Thanks, this is a great solution, I updated the image for tags because change a little.
Also when you choose "Custom metadata" choose the one for Process Group not host.
Hi guys, thanks for the reply.
Just one more doubt.
Should I pass this parameter as an ARG in my dockerfile, like:
ARG DT_CUSTOM_PROP = "Platform"
Cant remember if ENV or ARG (or if any of those will work), the syntax would be :
also you can pass it with key:value format:
and multiple values