In the Dev one I’ve created a set of automatic tag rules I’m happy with and I would like to know if there is a easy way to get that set of rules from that teenant and moved it into the Prod teenant.
Maybe using the API can be a solution.
I’ve managed to get the list of automatic tag rules by running:
You can use Monaco or the Terraform provided - which ever you prefer to manage this.
I’ll go with Monaco as you’ll get a little more support from Dynatrace on this since it’s their preferred tool.
I would recommend first taking a backup via monaco cli, which will give you all your configs (inc auto tags) in a format that you can then use going forward. e.g create a new repo and only copy across what you need to automate.
As @gopher indicates, the preferred option for Dynatrace is to use Monaco, but I find that in most cases doing it via API is much faster and more direct. Especially for transferring configurations from one environment to another. I find Monaco ideal for having a backup of the configuration.
If you are looking to Pull Rules that are defined in a particular Tenant, Ive found that it is easy to just run an API export using the GET and then jumping over to your target Tenant and pasting it as a POST. Yes you will need to delete a few segments like the TAG ID as that ID is associated to the GET request and the new POST will generate its own ID.
Now with the recent designs, you wont be able to use the old tag API, youll need to use the “Settings - Objects” from the Envrionment V2. If you need the schema ID, you can go to the Auto tags and click the “…” in the upper right hand and select Schema Info:
If you are looking to Pull Rules that are defined in a particular Tenant, Ive found that it is easy to just run an API export using the GET and then jumping over to your target Tenant and pasting it as a POST. Yes you will need to delete a few segments like the TAG ID as that ID is associated to the GET request and the new POST will generate its own ID.
Now with the recent designs, you wont be able to use the old tag API, youll need to use the “Settings - Objects” from the Envrionment V2. If you need the schema ID, you can go to the Auto tags and click the “…” in the upper right hand and select Schema Info:
What a positive surprised seing so many people trying to help.
I appreciate all your answer a lot. Thank you all
Right now we are backing up the Prd teenant so probably we wont tackle this until next Monday.
Anyway, the Terraform seemed the most suitable way until @ChadTurner explained how to use the API.
It took me some tries to make it work but I could export the tag rules object and create a new tag with a similar name to check how to do it and it worked great. So I think that, being confortable with the howto, using the API is going to be my choice once the backup is done.
I’ll keep you reported.
Thank you all again and have a great WK
There are many ways that you can achieve the desired outcome, just what best fits your needs and skill sets. You could then even move towards a script to do it all for you! I’m thrilled with all the responses and options we all provided you, a true ‘community’ effort for sure!
We use Monaco for pushing and pulling configurations from one tenant to another. However you need to be careful with scoping because there’s a lot of ID use and ID’s are tenant specific. We’re moving to the Terraform provider to help with some of this translation.
After getting a backup in the Prod teenant first, I ended finally using the API as @ChadTurner suggested to do the export and it work perfectly well. No issues at all.
Thank you very much everybody for al the suggested approches which I would like one day to explore those other aprroches/capabilities.
Thank you all again!!