Skip to content

Commit

Permalink
Update the multiple data source documentation [Multiple Data Source][…
Browse files Browse the repository at this point in the history
…2.13.0] (#6689)

* adding two feature flags to doc

Signed-off-by: Flyingliuhub <[email protected]>

* fix style check

Signed-off-by: Flyingliuhub <[email protected]>

* Update multi-data-sources.md

Signed-off-by: Melissa Vagi <[email protected]>

Signed-off-by: Melissa Vagi <[email protected]>

* Update multi-data-sources.md

Signed-off-by: Melissa Vagi <[email protected]>

Signed-off-by: Melissa Vagi <[email protected]>

* Update multi-data-sources.md

Signed-off-by: Melissa Vagi <[email protected]>

Signed-off-by: Melissa Vagi <[email protected]>

* Update multi-data-sources.md

Signed-off-by: Melissa Vagi <[email protected]>

Signed-off-by: Melissa Vagi <[email protected]>

* Update _dashboards/management/multi-data-sources.md

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: Tao Liu <[email protected]>

* Update _dashboards/management/multi-data-sources.md

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: Melissa Vagi <[email protected]>

* Update multi-data-sources.md

Signed-off-by: Melissa Vagi <[email protected]>

Signed-off-by: Melissa Vagi <[email protected]>

* Update multi-data-sources.md

Signed-off-by: Melissa Vagi <[email protected]>

Signed-off-by: Melissa Vagi <[email protected]>

* Update multi-data-sources.md

Signed-off-by: Melissa Vagi <[email protected]>

Signed-off-by: Melissa Vagi <[email protected]>

---------

Signed-off-by: Flyingliuhub <[email protected]>
Signed-off-by: Melissa Vagi <[email protected]>
Signed-off-by: Tao Liu <[email protected]>
Co-authored-by: Melissa Vagi <[email protected]>
Co-authored-by: Nathan Bower <[email protected]>
  • Loading branch information
3 people authored Mar 20, 2024
1 parent 1feb4d3 commit 9f85a88
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 11 deletions.
57 changes: 46 additions & 11 deletions _dashboards/management/multi-data-sources.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ redirect_from:

You can ingest, process, and analyze data from multiple data sources in OpenSearch Dashboards. You configure the data sources in the **Dashboards Management** > **Data sources** app, as shown in the following image.


<img src="{{site.url}}{{site.baseurl}}/images/dashboards/data-sources-management.png" alt="Dashboards Management Data sources main screen" width="700">

## Getting started
Expand All @@ -23,11 +22,11 @@ The following tutorial guides you through configuring and using multiple data so
To use multiple data sources, you must enable the `data_source.enabled` setting. It is disabled by default. To enable multiple data sources:

1. Open your local copy of the OpenSearch Dashboards configuration file, `opensearch_dashboards.yml`. If you don't have a copy, [`opensearch_dashboards.yml`](https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/config/opensearch_dashboards.yml) is available on GitHub.
2. Set `data_source.enabled:` to `true` and save the YAML file.
2. Set `data_source.enabled:` to `true` and save the YAML file.
3. Restart the OpenSearch Dashboards container.
4. Verify that the configuration settings were configured properly by connecting to OpenSearch Dashboards and viewing the **Dashboards Management** navigation menu. **Data sources** appears in the sidebar. You'll see a view similar to the following image.

<img src="{{site.url}}{{site.baseurl}}/images/dashboards/multidatasources.png" alt="Data sources in sidebar within Dashboards Management" width="700">
<img src="{{site.url}}{{site.baseurl}}/images/dashboards/multidatasources.png" alt="Data sources in sidebar within Dashboards Management" width="700">

### Step 2: Create a new data source connection

Expand All @@ -36,14 +35,15 @@ A data source connection specifies the parameters needed to connect to a data so
To create a new data source connection:

1. From the OpenSearch Dashboards main menu, select **Dashboards Management** > **Data sources** > **Create data source connection**.

2. Add the required information to each field to configure the **Connection Details** and **Authentication Method**.

- Under **Connection Details**, enter a title and endpoint URL. For this tutorial, use the URL `http://localhost:5601/app/management/opensearch-dashboards/dataSources`. Entering a description is optional.

- Under **Authentication Method**, select an authentication method from the dropdown list. Once an authentication method is selected, the applicable fields for that method appear. You can then enter the required details. The authentication method options are:
- **No authentication**: No authentication is used to connect to the data source.
- **Username & Password**: A basic username and password are used to connect to the data source.
- **AWS SigV4**: An AWS Signature Version 4 authenticating request is used to connect to the data source. AWS Signature Version 4 requires an access key and a secret key.
- **No authentication**: No authentication is used to connect to the data source.
- **Username & Password**: A basic username and password are used to connect to the data source.
- **AWS SigV4**: An AWS Signature Version 4 authenticating request is used to connect to the data source. AWS Signature Version 4 requires an access key and a secret key.
- For AWS Signature Version 4 authentication, first specify the **Region**. Next, select the OpenSearch service from the **Service Name** list. The options are **Amazon OpenSearch Service** and **Amazon OpenSearch Serverless**. Last, enter the **Access Key** and **Secret Key** for authorization.

For information about available AWS Regions for AWS accounts, see [Available Regions](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html#concepts-available-regions). For more information about AWS Signature Version 4 authentication requests, see [Authenticating Requests (AWS Signature Version 4)](https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html).
Expand All @@ -58,12 +58,11 @@ To create a new data source connection:
- To make changes to the data source connection, select a connection in the list on the **Data Sources** main page. The **Connection Details** window opens.

- To make changes to **Connection Details**, edit one or both of the **Title** and **Description** fields and select **Save changes** in the lower-right corner of the screen. You can also cancel changes here. To change the **Authentication Method**, choose a different authentication method, enter your credentials (if applicable), and then select **Save changes** in the lower-right corner of the screen. The changes are saved.

- When **Username & Password** is the selected authentication method, you can update the password by choosing **Update stored password** next to the **Password** field. In the pop-up window, enter a new password in the first field and then enter it again in the second field to confirm. Select **Update stored password** in the pop-up window. The new password is saved. Select **Test connection** to confirm that the connection is valid.

- When **AWS SigV4** is the selected authentication method, you can update the credentials by selecting **Update stored AWS credential**. In the pop-up window, enter a new access key in the first field and a new secret key in the second field. Select **Update stored AWS credential** in the pop-up window. The new credentials are saved. Select **Test connection** in the upper-right corner of the screen to confirm that the connection is valid.

5. Delete the data source connection by selecting the check box to the left of the title and then choosing **Delete 1 connection**. Selecting multiple check boxes for multiple connections is supported. Alternatively, select the trash can icon ({::nomarkdown}<img src="{{site.url}}{{site.baseurl}}/images/dashboards/trash-can-icon.png" class="inline-icon" alt="trash can icon"/>{:/}).
5. Delete the data source connection by selecting the check box to the left of the title and then choosing **Delete 1 connection**. Selecting multiple check boxes for multiple connections is supported. Alternatively, select the {::nomarkdown}<img src="{{site.url}}{{site.baseurl}}/images/dashboards/trash-can-icon.png" class="inline-icon" alt="trash can icon"/>{:/} icon.

An example data source connection screen is shown in the following image.

Expand Down Expand Up @@ -93,11 +92,13 @@ To select a data source through the Dev Tools console, follow these steps:
6. Repeat the preceding steps for each data source you want to select.

### Upload saved objects to a dashboard from connected data sources
To upload saved objects from connected data sources to a dashboard with multiple data sources, export them as an NDJSON file from the data source's **Saved object management** page. Then upload the file to the dashboard's **Saved object management** page. This method can make it easier to transfer saved objects between dashboards. The following 20-second video shows this feature in action.

To upload saved objects from connected data sources to a dashboard with multiple data sources, export them as an NDJSON file from the data source's **Saved object management** page. Then upload the file to the dashboard's **Saved object management** page. This method can simplify the transfer of saved objects between dashboards. The following 20-second video shows this feature in action.

<img src="{{site.url}}{{site.baseurl}}/images/dashboards/import_saved_objects_with_file_upload.gif" alt="Multiple data sources in Saved object management">{: .img-fluid}

#### Import saved objects from a connected data source

Follow these steps to import saved objects from a connected data source:

1. Locate your `opensearch_dashboards.yml` file and open it in your preferred text editor.
Expand All @@ -106,7 +107,41 @@ Follow these steps to import saved objects from a connected data source:
4. Select **Import** > **Select file** and upload the file acquired from the connected data source.
5. Choose the appropriate **Data source** from the dropdown menu, set your **Conflict management** option, and then select the **Import** button.

## Next steps
### Show or hide authentication methods for multiple data sources
Introduced 2.13
{: .label .label-purple }

A feature flag in your `opensearch_dashboards.yml` file allows you to show or hide authentication methods within the `data_source` plugin. The following example setting, shown in a 10-second demo, hides the authentication method for `AWSSigV4`.

````
# Set enabled to false to hide the authentication method from multiple data source in OpenSearch Dashboards.
# If this setting is commented out, then all three options will be available in OpenSearch Dashboards.
# The default value will be considered as true.
data_source.authTypes:
NoAuthentication:
enabled: true
UsernamePassword:
enabled: true
AWSSigV4:
enabled: false
````

<img src="{{site.url}}{{site.baseurl}}/images/dashboards/multidata-hide-show-auth.gif" alt="Multiple data sources hide and show authentication">{: .img-fluid}

### Hide the local cluster option for multiple data sources
Introduced 2.13
{: .label .label-purple }

A feature flag in your `opensearch_dashboards.yml` file allows you to hide the local cluster option within the `data_source` plugin. This option hides the local cluster from the data source dropdown menu and index creation page, which is ideal for environments with or without a local OpenSearch cluster. The following example setting, shown in a 20-second demo, hides the local cluster.

````
# hide local cluster in the data source dropdown and index pattern creation page.
data_source.hideLocalCluster: true
````

<img src="{{site.url}}{{site.baseurl}}/images/dashboards/multidata-hide-localcluster.gif" alt="Multiple data sources hide local cluster">{: .img-fluid}

## Next steps

Once you've configured your multiple data sources, you can start exploring that data. See the following resources to learn more:

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/dashboards/multidata-hide-show-auth.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9f85a88

Please sign in to comment.