This documentation is valid only for Console 1.x.
Following a name change only
If you have only changed the name of the Measurement Service schema, use the following steps:
Step 1
Open the following file in a text editor - this file is located on the server that is hosting the CAST RESTAPI that is managing your dashboard integration:
CATALINA_HOME\webapps\CAST-RESTAPI-integrated\WEB-INF\domains.properties
Step 2
Find line that starts with AAD - in the example below, the previous Measurement Service schema is called general_measure - the default name:
#Thu Apr 04 13:30:22 BST 2019 meudon_ENGINEERING_WEBI=Resource1,meudon_central AAD=Resource1,general_measure
Step 3
Change the name to the new schema. In this example the new Measurement Service schema is called general_measure2.
#Thu Apr 04 13:30:22 BST 2019 meudon_ENGINEERING_WEBI=Resource1,meudon_central AAD=Resource1,general_measure2
Step 4
Restart the CAST-RESTAPI web application, or the host Apache Tomcat server so that the changes are taken into account.
Following a change in host CAST Storage Service
If you have changed the host CAST Storage Service, use the following steps. If you have also changed the name of the Measurement Service schema, you will ALSO need to follow the steps described above in Following a name change only.
Step 1
Open the following file in a text editor - this file is located on the server that is hosting the CAST RESTAPI that is managing your dashboard integration:
CATALINA_HOME\webapps\CAST-RESTAPI-integrated\META-INF\context.xml
Step 2
Add a brand new configuration section with a new resource number by copy/pasting the existing Resource1 entry. In the example below a Resource2 section has been added after Resource1:
<?xml version="1.0" encoding="UTF-8"?> <Context> <!-- Keep this statement to disable session persistence across Tomcat restarts --> <Manager pathname="" /> <!--This connection example is provided for Tomcat 8/8.5 - Adapt server name (localhost) and port (2282) if required " --> <!-- EXISTING RESOURCE1 ENTRY --> <Resource name="jdbc/domains/Resource1" url="jdbc:postgresql://localhost:2282/postgres" username="operator" password="CastAIP" auth="Container" type="javax.sql.DataSource" driverClassName="org.postgresql.Driver" validationQuery="select 1" initialSize="5" maxTotal="20" maxIdle="10" maxWaitMillis="-1"/> <!-- NEW RESOURCE2 ENTRY --> <Resource name="jdbc/domains/Resource2" url="jdbc:postgresql://localhost:2282/postgres" username="operator" password="CastAIP" auth="Container" type="javax.sql.DataSource" driverClassName="org.postgresql.Driver" validationQuery="select 1" initialSize="5" maxTotal="20" maxIdle="10" maxWaitMillis="-1"/> </Context>
Step 3
Tailor the new resource entry to the new CAST Storage Service used for the Measurement Service schema by changing the server name and port number in the url= attribute. In the example below, the new CAST Storage Service is called "NEW_CSS" hosted on port 2282. Save the file when complete.
<?xml version="1.0" encoding="UTF-8"?> <Context> <!-- Keep this statement to disable session persistence across Tomcat restarts --> <Manager pathname="" /> <!--This connection example is provided for Tomcat 8/8.5 - Adapt server name (localhost) and port (2282) if required " --> <!-- EXISTING RESOURCE1 ENTRY --> <Resource name="jdbc/domains/Resource1" url="jdbc:postgresql://localhost:2282/postgres" username="operator" password="CastAIP" auth="Container" type="javax.sql.DataSource" driverClassName="org.postgresql.Driver" validationQuery="select 1" initialSize="5" maxTotal="20" maxIdle="10" maxWaitMillis="-1"/> <!-- NEW RESOURCE2 ENTRY --> <Resource name="jdbc/domains/Resource2" url="jdbc:postgresql://NEW_CSS:2282/postgres" username="operator" password="CastAIP" auth="Container" type="javax.sql.DataSource" driverClassName="org.postgresql.Driver" validationQuery="select 1" initialSize="5" maxTotal="20" maxIdle="10" maxWaitMillis="-1"/> </Context>
Step 4
Open the following file in a text editor - this file is located on the server that is hosting the CAST RESTAPI that is managing your dashboard integration:
CATALINA_HOME\webapps\CAST-RESTAPI-integrated\WEB-INF\domains.properties
Step 5
Find line that starts with AAD:
#Thu Apr 04 13:30:22 BST 2019 meudon_ENGINEERING_WEBI=Resource1,meudon_central AAD=Resource1,general_measure
Step 6
Change the ResourceX entry to match the Resource entry created in the context.xml file. In the example, Resource1 has been changed to Resource2. Save the file when complete.
#Thu Apr 04 13:30:22 BST 2019 meudon_ENGINEERING_WEBI=Resource1,meudon_central AAD=Resource2,general_measure
Step 7
Restart the CAST-RESTAPI web application, or the host Apache Tomcat server so that the changes are taken into account.