02 Jun 2023 02:33 PM - last edited on 06 Jun 2023 09:26 AM by andre_vdveen
I am looking for the best practices.
Because this functionality is not exposed to API and if we have a lot of users with "write" rights, it is always a risk to delete an entity and configurations.
Since POST API creates a brand new entity ID, I don't consider it as restore functionality.
14 Jun 2023 07:49 PM - edited 14 Jun 2023 07:51 PM
Use Monaco and/or Terraform to backup Dynatrace settings
https://github.com/Dynatrace/dynatrace-configuration-as-code/releases
https://www.youtube.com/@dynatrace/search?query=monaco
https://www.dynatrace.com/support/help/manage/configuration-as-code
15 Jun 2023 12:35 PM
Please take a look closer in API limitations described in initial post.
You can't delete-> restore
Only one option delete->create new entity
The simple example - delete key user action, create new one - and build a table from data explorer.
It will 2 key user actions with the same name. Because they indeed have different ids.
How Monaco(API wrapper) will restore deleted entity if there no such option in API?)
15 Jun 2023 12:52 PM
For many entities such as applications or dashboards you can create the entity with a specific ID by using PUT instead of POST method (Configuration API).
15 Jun 2023 01:09 PM - edited 15 Jun 2023 01:09 PM
1) For many entities like key user action api - dynathe just has not PUT methods.
2) For some entities like application properties - you can't do it (you will get elastic cache error back usually)
So this not consistent solution for dynatrace.
BTW Are you used in PUT for for restore deleted entities? If yes with which?
With app configs if is not working (#2 conflicts)
15 Jun 2023 03:22 PM
Yes, it depends, it's not possible for all types of configurations.
The solution is to setup the access permissions so users won't delete entities. If you don't trust your users, don't give them permission to break things.
With great power comes great responsibility.
15 Jun 2023 03:50 PM
"The solution is to setup the access permissions so users won't delete entities."
With all respect - it is not a solution, because denied collaboration. Every make mistakes over time.
The main thing what usually designed for every application which have a sensitive data: backup and RESTORE. This is the SaaS service, that mean it should be triple attention on data recovery since customers trust to store information in service and configurations source of true are here as well .
Important point that dynatrace has 30days cache(maybe more) and Ops can restore deleted items based on support ticket. But there no good solution for "dynatrace as service" for end users.
I just hope that "version history" created for new features later will muted later to versioning history for all "environment" as entity and it will be possible to just restore environment version in 1 api call/click. But afraid it will be 20Y later.