19 Apr 2023 10:02 PM
monaco version 2.0.0
I am trying to download the configuration from the free trial Dynatrace instance with the following command:
Solved! Go to Solution.
20 Apr 2023 05:01 AM
Hi @Laszlo,
you need to set the enviornment variable first, so from PowerShell use the following command and add your token
$env:API_TOKEN_ENV_VAR = 'dt0c01.xxxxxxxxxxxxxxxxxxxx'
then run the command again with API_TOKEN_ENV_VAR
monaco download --url https://{environmentid}.live.dynatrace.com --token API_TOKEN_ENV_VAR
20 Apr 2023 05:11 AM
also, you can set the environment persistently so they should remain even when close the session
[System.Environment]::SetEnvironmentVariable('API_TOKEN_ENV_VAR','dt0c01.xxxxxxxxxxxxxxxxxxxx')
then run the command again with API_TOKEN_ENV_VAR
monaco download --url https://{environmentid}.live.dynatrace.com --token API_TOKEN_ENV_VAR
20 Apr 2023 08:17 PM
Thanks Mohamed,
It seems to work, but the result is kind of disappointing.
Alert profiles are a basic thing, but cannot be managed by monaco. We hope calling the API with good old curl will yield better results. We need a solution where we can store our configuration as code.
2023/04/20 15:03:37 INFO Downloaded 2 settings for schema builtin:alerting.profile
2023/04/20 15:03:37 WARN Downloaded setting of schema "builtin:alerting.profile" will be discarded. Reason: "Default" cannot be managed via configuration as code
2023/04/20 15:03:37 WARN Downloaded setting of schema "builtin:alerting.profile" will be discarded. Reason: "Default for ActiveGate Token Expiry" cannot be managed via configuration as code
21 Apr 2023 04:25 AM
Hi @Laszlo,
alerting profiles will be downloaded but not the default alerting profiles, the default alerting profiles are already available in every environment,
for instance, I have two alerting profiles that are not the "Default" and "Default for ActiveGate Token Expiry", and the alerting profiles I've created have already been downloaded while the default failed. so the total will be 4 alerting profiles including the default profiles
2023/04/21 05:16:24 INFO Downloaded 4 settings for schema builtin:alerting.profile
2023/04/21 05:16:24 WARN Downloaded setting of schema "builtin:alerting.profile" will be discarded. Reason: "Default" cannot be managed via configuration as code
2023/04/21 05:16:24 WARN Downloaded setting of schema "builtin:alerting.profile" will be discarded. Reason: "Default for ActiveGate Token Expiry" cannot be managed via configuration as code
as per the log you've provided, it seems that you don't have any other alerting profiles except for the default ones