Configure your PostgreSQL instances - v. 2.x
Introduction
Before creating any applications, you should ensure that you configure your PostgreSQL instances that will be used for your analysis/snapshot schema storage and for your Measurement schema. To do so, switch to the Admin Center:

Then click the Global Configurations tab:

Then expand the CSS and Measurement Settings section - see Administration Center - Settings - CSS and Measurement settings:

Focus on the Settings section:

In Enterprise mode, by default, one database connection will already be predefined:
- When using Docker/Docker Desktop, this is a connection to the PostgreSQL database provided as a Docker container and is used to store the aip_node and aip_config persistence schemas
- When using Java JAR installers, this is a connection to the PostgreSQL database defined in the Service Registry installer used to store the node_standalone persistence schema
It is possible to use this database connection for your analysis/snapshot schema storage needs, however, CAST strongly recommends that you deploy additional standalone PostgreSQL instances that are dedicated to analysis/snapshot schema storage only.
Add your additional PostgreSQL instances
Now add any additional PostgreSQL instances that you want to make available to your Node instances for analysis/snapshot schema storage purposes for each Application that you create or for Measurement schema storage using the Add Database Connection button:

Then fill in the required details and click Add when ready ( Console will check that the connection can be made using the parameters you enter):

| Host | The host name of your target PostgreSQL instance, e.g. a host name or IP address. |
| Port | The port which your target PostgreSQL instance is running on. |
| Username | The login credentials for your target PostgreSQL instance. For example operator/CastAIP for a PostgreSQL instance in default configuration. |
| Password | |
| Database name | The PostgreSQL database used to store your schemas. For a PostgreSQL instance in default configuration, this will be postgres (this will be prefilled) but if your target instance uses a different database name, please modify it as appropriate. |
| Use SSL | Tick this option if your target PostgreSQL instance is running in SSL encrypted mode. See SSL encrypted mode configuration for PostgreSQL. |
The newly added PostgreSQL instance will now appear in the list:

- You can add as many additional PostgreSQL instances as you need.
- You can add additional instances at any time.
Enable your PostgreSQL instances for Analysis/Snapshot and/or Measurement storage requirements
When you have added your additional PostgreSQL instance(s), you now need to decide which storage requirements you will enable:
Enable for Analysis/Snapshot storage requirements
To make a newly added PostgreSQL instance available to your Nodes for Analysis/Snapshot storage requirements, you need to tick the check box in the CSS column and then click Save. In the example below, the instance “UBUNTU2004” is ticked, while the “192.168.200.107” default Docker container instance is unticked:

When a new Application is added, any PostgreSQL instances that are ticked in the above screen will be available as storage for your Application. For example, ticking both instances will show the following selector:
| Onboarding workflow with Fast Scan | See Application - Overview with Fast Scan and Application onboarding with Fast Scan - run the initial deep analysis: |
| Legacy workflow (without Fast Scan) | See Legacy application onboarding - Add a new Application: |
Enable for Measurement storage requirements
The Measurement schema is required for consolidating snapshot data from all Nodes for display in the CAST Health Dashboard. Only one Measurement schema is required for all Nodes and this schema will be used by the CAST Health Dashboard exclusively. CAST recommends that you always deploy 1 x PostgreSQL (on a dedicated Windows (PostgreSQL) server) only for the MEASUREMENT schema.
If you need to add a new instance, use the Add Database Connection button as explained above.
Enable instance
Then, enable the instance you want to use for the Measurement schema using the radio buttons in the Measurement column - you can only select ONE instance - and click the Save button:

Define Measurement schema name
For the Measurement schema name, Console will suggest the name general_measure, however, you can use any name you require:

Authorized characters for the name are as follows:
- 0-9
- A-Z
- _ (underscore)
A validation process is actioned when you click Save, and any unauthorized characters, such as -, # or $ will be rejected.