cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can I use the ‘monaco download’ to only download a specific dashboard ID?

panda
Guide

With the command ‘monaco download --manifest manifest.yaml --environment development-environment --api dashboard,’ it can download all dashboards from the target Dynatrace environment. I have a specific dashboard with the ID ‘20103b07-fe23-4811-b514-96d7d177a716.’ Can I use ‘monaco download’ to only download this specific dashboard? I don't want to download all the dashboards.

I didn't see such a function introduced in https://docs.dynatrace.com/docs/manage/configuration-as-code/monaco/reference/commands

4 REPLIES 4

AntonPineiro
DynaMight Guru
DynaMight Guru

Hi,

Maybe with this option:

AntonPineiro_0-1703244505128.png

But I would download all to know object ID. I hope someone can provide a better answer.

Best regards

❤️ Emacs ❤️ Vim ❤️ Bash ❤️ Perl

It seems that the provided solution is for configuring settings, not for API. What I am looking for is the API parameter to specify the UUID using the Monaco download command. Ideally, a command like the following:

 

monaco download --manifest manifest.yaml --environment development-environment --api dashboard --id '20103b07-fe23-4811-b514-96d7d177a716'

Hi,

Then, I think it is not possible actually. You can create a product idea.

Best regards

❤️ Emacs ❤️ Vim ❤️ Bash ❤️ Perl

You can use https://registry.terraform.io/providers/dynatrace-oss/dynatrace/latest/docs
It is more flexible
You will need CLI or some script like this to add separate files into state:

    if TERRAFORM_IMPORT:
        """Loop for import"""
        os.environ['DYNATRACE_ENV_URL'] = DYNATRACE_ENV_URL
        os.environ['DYNATRACE_API_TOKEN'] = DYNATRACE_API_TOKEN
        os.environ['DYNATRACE_TERRAFORM_BIN'] = DYNATRACE_TERRAFORM_BIN

        with open(CSV_FILE_NAME, newline='') as csvfile:
            reader = csv.DictReader(csvfile)
            for row in reader:
                print(row['IMPORT_CMD_PATH'], row['RESOURCE_ID'])
                IMPORT_CMD_PATH = row['IMPORT_CMD_PATH']
                RESOURCE_ID = row['RESOURCE_ID']

                """import all resources - ignore ignore already imported warning"""
                try:
                    terraform_import = subprocess.Popen(
                        args=["terraform", "import", IMPORT_CMD_PATH, RESOURCE_ID],
                        cwd=PROJECT_FOLDER)
                    error = terraform_import.communicate()
                except:
                    Exception(error)





 

Featured Posts