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

This product reached the end of support date on March 31, 2021.

Automatic exports of configuration files

jean_louis_lorm
Dynatrace Pro
Dynatrace Pro

Hello,

Do you know if it's possible to automaticaly export these configurations files with a DCRUM scheduled task or something like that :

?Export Site

?Export Reporting Group, Applications/Transactions and Tiers

?Export ALL_Report DMI.xml

I need it for a customer internal process.

Regards,

JLL

10 REPLIES 10

adam_piotrowicz
Dynatrace Pro
Dynatrace Pro

It should be possible, but we need to test it to make sure. We will let you know.

Good news. I hope it will work(smile)

adam_piotrowicz
Dynatrace Pro
Dynatrace Pro

So, first two things can be achieved by retrieving ExportConfig.zip, however it won't contain all DMI reports.

To makes exports much smaller we can export just only what you need.

Create config\task-110-config_export.xml file and paste:




adlex.delta.scheduler.command.ReportCommand
http://localhost/LocImpExp?op=export&formatDiscover=direct
D:\CAS\Config_Exports\Sites.txt


adlex.delta.scheduler.command.ReportCommand
http://localhost/ImpExp?lsAction=exportAll
D:\CAS\Config_Exports\Reports.txt


adlex.delta.scheduler.command.ReportCommand
http://localhost/RgCfgExport?op=export&source=vas
D:\CAS\Config_Exports\TransAppsTiers.txt


adlex.delta.scheduler.command.ShellCommand
{delta.root}{file.separator}config{file.separator}rename.bat


This will trigger daily exports of Sites, DMI Reports and Apps/Trans/RG/Tiers at 9pm and renaming the files to append the timestamps.

The following config\rename.bat file should be also created;

@echo off
😧
cd CAS\Config_Exports\
IF %time:~-11,2% lss 10 (rename Sites.txt %date:~-4,4%%date:~-10,2%%date:~-7,2%0%time:~-10,1%%time:~-8,2%%time:~-5,2%_Sites.txt) ELSE (rename Sites.txt %date:~-4,4%%date:~-10,2%%date:~-7,2%%time:~0,2%%time:~3,2%%time:~6,2%_Sites.txt)
IF %time:~-11,2% lss 10 (rename Reports.txt %date:~-4,4%%date:~-10,2%%date:~-7,2%0%time:~-10,1%%time:~-8,2%%time:~-5,2%_Reports.txt) ELSE (rename Reports.txt %date:~-4,4%%date:~-10,2%%date:~-7,2%%time:~0,2%%time:~3,2%%time:~6,2%_Reports.txt)
IF %time:~-11,2% lss 10 (rename TransAppsTiers.txt %date:~-4,4%%date:~-10,2%%date:~-7,2%0%time:~-10,1%%time:~-8,2%%time:~-5,2%_TransAppsTiers.txt) ELSE (rename TransAppsTiers.txt %date:~-4,4%%date:~-10,2%%date:~-7,2%%time:~0,2%%time:~3,2%%time:~6,2%_TransAppsTiers.txt)

Please let us know if you're able to test it.

Hello Adam,

It's a good news !!!

I will test it asap

Thanks

JLL

jean_louis_lorm
Dynatrace Pro
Dynatrace Pro

Hi Adam,

This task is very good except for the Business Units (ID=2)

There is an issue due to the "&" in this URL

 
            <param>http://localhost/RgCfgExport?op=export&source=vas</param>

Error message :

"E SCHED 14-09-03 14:00:00.053 Error during loading tasks definition, tasks NOT LOADED  
TaskXmlParser, error occured during parsing task definition file tasks-506-Export_Config.xml: The reference to entity "source" must end with the ';' delimiter."

this URL works fine without the task.

 

I tried to change "&" with "&amp;"

   <param>http://localhost/RgCfgExport?op=export&amp;source=vas</param>

In this case, there is no more error, but the result is not usable - the URL doesn't work anymore.

 

Have you a solution to execute this URL in the scheduled task?

Regards,

 

E SCHED 14-09-03 14:00:00.053 Error during loading tasks definition, tasks NOT LOADED  
TaskXmlParser, error occured during parsing task definition file tasks-506-Export_Config.xml: The reference to entity "source" must end with the ';' delimiter.

First of all please remember that every time you save the file with "&amp;" and edit it again it will revert to "&", so it needs to be corrected every time you save the file.

Please edit your task file, change "&" to "&amp;" save the file, execute the task manually and share server.log part with the execution.

jean_louis_lorm
Dynatrace Pro
Dynatrace Pro

Thank you Adam - Now it's working !

I have changed some detail in the task :

tasks-501-Export_Config.xml      (with rename.bat)

<tasks>

    <task ID="ConfigExport" mergeMode="NONE"  name="Config Export" periodType="DAY" period="1" timeLine="SERVER" offsetTime="21:00" timeout="00:10">

        <command ID="0" name="Getting the Sites">

            <class>adlex.delta.scheduler.command.SaveReportCommand</class>

            <param>/LocImpExp?op=export&amp;formatDiscover=direct</param>

            <param>D:\temp\Config_Exports\Sites.txt</param>

        </command>

        <command ID="1" name="Getting the TransAppsTiers">

            <class>adlex.delta.scheduler.command.SaveReportCommand</class>

            <param>/RgCfgExport?op=export&amp;source=vas</param>

            <param>D:\temp\Config_Exports\TransAppsTiers.txt</param>

        </command>

        <command ID="2" name="Getting the Reports">

            <class>adlex.delta.scheduler.command.SaveReportCommand</class>

            <param>/ImpExp?lsAction=exportAll</param>

            <param>D:\temp\Config_Exports\Reports.txt</param>

        </command>

        <command ID="3" name="Renaming files">

            <class>adlex.delta.scheduler.command.ShellCommand</class>

            <param>{delta.root}{file.separator}config{file.separator}rename.bat</param>

        </command>

    </task>

</tasks>

 

Thanks a lot, this (smile)

 

waldemar_sabenh
Newcomer

How can I plan this job? THX


This way:

https://www.dynatrace.com/support/doc/nam/cas-and-reporting/settings/cas-configuration/task-scheduling/


waldemar_sabenh
Newcomer

Thanks for your answer!

Can i export application.xml (software service definitions) with one task?