Last modified by Aurelie Bertrand on 2025/02/07 10:18

Hide last authors
jhurst 1.1 1 {{ddtoc/}}
2
Aurelie Bertrand 60.1 3 **Audit Module Deployment For DigDash Enterprise**
jhurst 1.1 4
Aurelie Bertrand 60.1 5 This document explains how to deploy the audit module integrated into DigDash Enterprise. This module allows an administrator of the system to retrieve the list of data cubes and flows and the history of all user sessions.
jhurst 1.1 6
Aurelie Bertrand 60.1 7 = Module Installation =
jhurst 1.1 8
Aurelie Bertrand 60.1 9 The audit module is delivered as a zip file compatible with the DigDash Enteprise backup restore. Here is the process to deploy this module:
Aurelie Bertrand 44.1 10
Aurelie Bertrand 60.1 11 1. Connect to DigDash Enterprise home page with a web browser (default is http:~/~/localhost:8080/adminconsole)
12 1. Click on **Configuration**, then **Backup Management** and **Restore**
13 1. If not already done, login with the DigDash Enteprise super administrator user
14 1. Click on button **Browse File...**
15 1. In the file selector, browse to the folder <DD install>/add-ons/ddaudit and choose the file **ddaudit_module.zip**
16 1. Click on **Load** button
17 1. Confirm the import options by clicking on **Validate** button
18 1. Restart your server
jhurst 1.1 19
Aurelie Bertrand 60.1 20 At the end of the import operation, DigDash Enterprise has a new **DDAudit** role containing:
jhurst 1.1 21
Aurelie Bertrand 60.1 22 * Pre-defined data models to create visualizations on audit data
23 * Pre-defined flows: cubes lists, flows list and user sessions lists
24 * Pre-defined dashboard pages to display audit data
abertrand 8.2 25
Aurelie Bertrand 60.1 26 = Access to the DigDash Enterprise audit data =
abertrand 22.1 27
Aurelie Bertrand 60.1 28 To visualize this information, you must add the **DDAudit** role to your DigDash Enterprise administrator, or any other user you choose for this task.
Aurelie Bertrand 32.4 29
Aurelie Bertrand 60.1 30 From the **Server Status** page, start the audit services you want to use (Sessions, Cubes and Flows audit services).
abertrand 22.1 31
Aurelie Bertrand 60.1 32 The pre-defined reports are directly available in the **Server Status** page, or in the Information Wallet of users with DDAudit role.
abertrand 17.1 33
Aurelie Bertrand 60.1 34 You can also create your own flows based on the pre-defined data models, and new data models on the audit database.
abertrand 17.1 35
Aurelie Bertrand 60.1 36 = Managing DDAudit Database files =
abertrand 25.2 37
Aurelie Bertrand 60.1 38 == Migration from a previous version of the audit module ==
Aurelie Bertrand 38.1 39
Aurelie Bertrand 60.1 40 If you had deployed a the audit module in a previous DigDash Enterprise build (before the 2014B0603), the name of the audit H2 database was then //DDAudit//.
abertrand 25.2 41
Aurelie Bertrand 60.1 42 From version 2014B0603 this name has changed by default into //DDAudit_<DDE domain>// to accommodate multi-domains deployment on the same server. After this change the previous audit data are not available anymore in the new version of DigDash Enterprise.
abertrand 17.1 43
Aurelie Bertrand 60.1 44 To retrieve them, there are 2 possible migration scenarios :
abertrand 17.1 45
Aurelie Bertrand 60.1 46 * Option 1 (recommended): By renaming the old //DDAudit// database into //DDAudit_<DDE domain>// (by default the DDE domain name is //ddenterpriseapi),//
47 * Option 2 : By referencing the old //DDAudit// database name into the new DigDash Enterprise version (web.xml modification).
abertrand 17.1 48
Aurelie Bertrand 60.1 49 __Option 1 (recommended) : Renaming the old DDAudit database__
abertrand 17.1 50
Aurelie Bertrand 60.1 51 Choose this option if you did not modify the DDAudit data models, or if you do not want to keep these modifications. The modification of audit flows and/or audit dashboards is not significant for this option.
abertrand 17.1 52
Aurelie Bertrand 60.1 53 Migration procedure for option 1
abertrand 17.1 54
Aurelie Bertrand 60.1 55 1. Stop DigDash Enterprise servers
56 1. Find the files **DDAudit.h2.db** et **DDAudit.trace.db** on the server computer:
abertrand 18.1 57
Aurelie Bertrand 60.1 58 * On Windows these files can be found in the installation folder of DigDash Enterprise if the server is manually started using start_servers.bat, or <Windows>/System32 if the server is started as a Windows service.
59 * On Linux, depending on the system configuration, these files can be found in your Tomcat installation folder (usually at the same place than the logs).
jhurst 1.1 60
Aurelie Bertrand 60.1 61 (% start="3" %)
62 1. Process these files as below:
jhurst 1.1 63
Aurelie Bertrand 60.1 64 * Copy and rename **DDAudit.h2.db** into **DDAudit_<DDE domain>.h2.db** (example: **DDAudit_ddenterpriseapi.h2.db)**
65 * Copy and rename **DDAudit.trace.db** into **DDAudit~_~_<DDE domain>.trace.db** (example: **DDAudit_ddenterpriseapi.trace.db**)
jhurst 1.1 66
Aurelie Bertrand 60.1 67 (% start="4" %)
68 1. Start DigDash Enterprise servers
69 1. __Deploy the new audit module (chapter I)__ so the audit data models correctly access the new audit database.
jhurst 1.1 70
Aurelie Bertrand 60.1 71 __Option 2: Modification of web.xml to link to the old DDAudit database__
Aurelie Bertrand 37.1 72
Aurelie Bertrand 60.1 73 Choose this option if you modified the DDAudit data models. The modification of audit flows and/or audit dashboards is not significant for this option. Warning: If you have several ddenterpriseapi_xxxx on the same Tomcat, it is recommended to migrate only for one domain because the DDAudit database can not be used by different domains at the same time.
abertrand 25.2 74
Aurelie Bertrand 60.1 75 Migration procedure for option 2:
jhurst 1.1 76
Aurelie Bertrand 60.1 77 1. __If this is a first start after a DigDash Enteprise upgrade (new war files)__, start the Tomcat server and wait for the full deployment of the new war files. As soon as Tomcat has fully started (the message //Server startup in xxxx ms// shows in Tomcat console), stop DigDash Enterprise servers.
78 1. Edit the file <DigDash Enterprise install>/apache-tomcat/webapps/ddenterpriseapi/WEB-INF/web.xml.
79
80 * Change the value of parameter **audit.db.url** from **jdbc:h2:DDAudit_${server.DomainName};AUTO_SERVER=TRUE** into **jdbc:h2:DDAudit**
81
82 (% start="3" %)
83 1. Start DigDash Enterprise servers
84
85 == Changing the location of the DDAudit database files ==
86
87 By default, the DDAudit database files are stored in the Tomcat work directory. In some configurations this path may not be the default <DDE Install> folder.
88
89 For example, on Linux the location may be the Tomcat installation folder, and default user rights may prevent the server to write files in that folder. DDAudit would not work in this case.
90
91 Another example is for Windows, when Tomcat is started as a service, the DDAudit files could land in Windows/system32 folder.
92
93 You can change the location of the DDAudit database files with the following procedure:
94
95 1. Stop DigDash Enterprise server
96 1. Edit the file <DigDash Enterprise install>/apache-tomcat/webapps/ddenterpriseapi/WEB-INF/web.xml.
97
98 *
99 ** Change the value of parameter **audit.db.url** from **jdbc:h2:DDAudit_${server.DomainName};AUTO_SERVER=TRUE** into **jdbc:h2:**[[(% class="wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink" %)**file:/home/audit/**>>path:../../../../../home/audit/DDAudit_$]](%%)[[(% class="wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink" %)**DDAudit_$**>>path:../../../../../home/audit/DDAudit_$]](%%)**{server.DomainName};AUTO_SERVER=TRUE** (notice the “file:” inserted at the start of the URL)
100
101 1. Make sure this folder exists and move all the existing **DDAudit*.db** files to the new location
102 1. Start DigDash Enterprise server
103
104 (% class="box infomessage" %)
105 (((
106 //Note: The parameters audit.db.url, audit.db.user, audit.db.password and audit.db.tcpServer can be specified as JVM lauch parameters, for instance by adding them to the JAVA_OPTS variable (setenv.bat, setenv.sh…) or in catalina.properties: JAVA_OPTS=[…] -Daudit.db.url=jdbc:h2~://[[(% class="wikiinternallink wikiinternallink wikiinternallink wikiinternallink wikiinternallink" %)//file:/home/DDAudit;AUTO_SERVER=TRUE//>>path:../../../../../home/DDAudit%3BAUTO_SERVER=TRUE]](%%)// [...]//
107 )))
108
109 Another alternative is to change the value of parameter **h2.baseDir**, which changes the behavior for all H2 bases (DDAudit but also DDComments):
110
111 1. Stop DigDash Enterprise server
112 1. Locate and edit the **catalina.properties** file on the server hard drive (ex: <DDE Install>/apache-tomcat/conf/**catalina.properties** on DigDash Enterprise Windows installation)
113 1. Add the following line:(((
114 **h2.baseDir=/the/new/db/path**
115
116 (% class="box infomessage" %)
117 (((
118 Note: This path can be relative to the initial Tomcat workdir (ex: h2.baseDir=./db)
119 )))
120 )))
121 1. Make sure this folder exists and move all the existing **DDAudit*.db** files to the new location
122 1. Start DigDash Enterprise server
123
124