About:
This article will help you to work with reporting and other raw data that is stored in OpenSearch of CP4BA in a development environment with
steps. It will help to see raw data of the documents along with all the fields in it. This article will direct you to find out for OpenSearch URL, credentials and the installation of OpenSearch dashboards component. This will help to design the BPC dashboards meaning fully according to the requirement.
What you should have :
Just CP4BA cluster credentials.
Steps to be followed:
Get OpenSearch URL:
1. Login into CP4BA cluster and browse to Workloads -> ConfigMaps
2. Search for the configMap “icp4adeploy-cp4ba-access-info” as below and click on it.

3. Under “bai-access-info” section, you can find OpenSearch URL and OpenSearch connection secret name.

Get OpenSearch credentials:
1. Browse to Workloads -> Secrets
2. Search for the secret “opensearch-ibm-elasticsearch-cred-secret” as shown below and click on it.

3. The username is “elastic” and for password copy the hidden value.

Get OpenSearch version:
1. Access the OpenSearch URL from a browser and it will ask for credentials.
2. You need to provide credentials as below that we got earlier.

3. Then it displays openSearch version as below. Here in this example, the version is 2.17.0

Install OpenSearch dashboards:
1. Download same version of OpenSearch dashboards component (for any OS ) from https://opensearch.org/artifacts/by-version/#release-2-x link.


Configure OpenSearch dashboards:
1. After downloading the zip file, you can unzip it into a proper location.
2. Browse to <OpenSearch dashboards location>/opensearch-dashboards-2.17.0/config/opensearch_dashboards.yaml
3. Edit the file by modifying the OpenSearch URL, username and password fields.
4. As this article talks about just development environment, if security is not a concern, the below line can be added in the last “opensearch_security.enabled: false” as shown below. Otherwise, you will have to install security plugins required.

Start OpenSearch dashboards:
1. Browse to <OpenSearch dashboards location>/opensearch-dashboards-2.17.0/bin and execute opensearch_dashboards.bat file.
2. OpenSearch dashboards component starts as below

Login OpenSearch Dashboards:
1. Browse to OpenSearch dashboards URL that is displayed in console when the component is started from above command prompt (default is http://localhost:5601).
2. Provide OpenSearch credentials.

3. This will take us to home page as below

Create index pattern:
1. Browse to Home -> Management -> Dashboard Management


2. Click on “Index Patterns”

3. Click on “Create index pattern” and give a name with regular expression matching all the required indexes.
4. Create 2 indexes out of which one is for summaries, and the other is for time series events.


Discover data stored in OpenSearch:
1. Go to home and click on OpenSearch Dashboards

2. Click on Discover

3. Select/Adjust the appropriate index pattern on top left corner and adjust the time frame on the top right corner to see data.


4. One can filter the databased on the values, add columns and do many more operations along with seeing the raw documents

This way, you can check raw data and see different fields in each index and each document and this should help to better design BPC dashboards.