Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating data sources docs # 7680 #7800

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
9a13153
Updating data sources docs # 7680
AntonEliatra Jul 23, 2024
ceeb9f0
Update connect-prometheus.md
AntonEliatra Jul 23, 2024
50969ec
Update data-sources.md
AntonEliatra Jul 24, 2024
e58b02f
Merge branch 'main' into adding-data-sources-documentation
hdhalter Jul 30, 2024
a3b484a
removing the screenshot from data sources
AntonEliatra Aug 7, 2024
988a2a3
Merge branch 'main' into adding-data-sources-documentation
Naarcha-AWS Aug 12, 2024
3f85568
Revise text for accuracy and readability
vagimeli Aug 13, 2024
a5fa35f
Copy edits to headings
vagimeli Aug 13, 2024
0501b54
Revise lines 39-42
vagimeli Aug 13, 2024
2b43758
Merge branch 'main' into adding-data-sources-documentation
vagimeli Aug 15, 2024
991ff62
Merge branch 'main' into adding-data-sources-documentation
vagimeli Aug 20, 2024
6aa614b
Update connect-prometheus.md
vagimeli Aug 21, 2024
7aae9dd
Update _dashboards/management/connect-prometheus.md
vagimeli Aug 27, 2024
ceb45ba
Update _dashboards/management/connect-prometheus.md
vagimeli Aug 27, 2024
847be09
Update _dashboards/management/connect-prometheus.md
vagimeli Aug 27, 2024
a0c5520
Update connect-prometheus.md
vagimeli Aug 27, 2024
ae8fa8e
Update _dashboards/management/data-sources.md
vagimeli Aug 27, 2024
aec8bc3
Update _dashboards/management/data-sources.md
vagimeli Aug 27, 2024
51c3a42
Update data-sources.md
vagimeli Aug 27, 2024
532213b
Merge branch 'main' into adding-data-sources-documentation
vagimeli Aug 27, 2024
1d03bec
Update _dashboards/management/connect-prometheus.md
vagimeli Aug 27, 2024
49e5384
Update _dashboards/management/connect-prometheus.md
vagimeli Aug 27, 2024
3daccbf
Update _dashboards/management/connect-prometheus.md
vagimeli Aug 27, 2024
5c9f050
Update _dashboards/management/connect-prometheus.md
vagimeli Aug 27, 2024
f45bf68
Update _dashboards/management/connect-prometheus.md
vagimeli Aug 27, 2024
a09f26d
Update data-sources.md
vagimeli Aug 27, 2024
ff765b7
Address editorial feedback
vagimeli Aug 27, 2024
6824b77
Update connect-prometheus.md
vagimeli Aug 27, 2024
3e8ee23
Update connect-prometheus.md
vagimeli Aug 27, 2024
ae1e46c
Update data-sources.md
vagimeli Aug 27, 2024
e8ed29c
Update _dashboards/management/connect-prometheus.md
vagimeli Aug 27, 2024
17e0e47
Update _dashboards/management/connect-prometheus.md
vagimeli Aug 27, 2024
487aea0
Update connect-prometheus.md
vagimeli Aug 27, 2024
e1a8fda
Update connect-prometheus.md
vagimeli Aug 27, 2024
48db453
Update connect-prometheus.md
vagimeli Aug 27, 2024
2cd1ec4
Update connect-prometheus.md
vagimeli Aug 27, 2024
ec765b0
Update _dashboards/management/data-sources.md
vagimeli Aug 28, 2024
19aba84
Merge branch 'main' into adding-data-sources-documentation
vagimeli Aug 28, 2024
786634d
Update connect-prometheus.md
vagimeli Aug 28, 2024
52ee85d
Merge branch 'main' into adding-data-sources-documentation
vagimeli Aug 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions _dashboards/management/connect-prometheus.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
layout: default
title: Connecting Prometheus to OpenSearch
parent: Data sources
nav_order: 20
---

# Connecting Prometheus to OpenSearch

Check failure on line 8 in _dashboards/management/connect-prometheus.md

View workflow job for this annotation

GitHub Actions / style-job

[vale] reported by reviewdog 🐶 [OpenSearch.HeadingCapitalization] 'Connecting Prometheus to OpenSearch' is a heading and should be in sentence case. Raw Output: {"message": "[OpenSearch.HeadingCapitalization] 'Connecting Prometheus to OpenSearch' is a heading and should be in sentence case.", "location": {"path": "_dashboards/management/connect-prometheus.md", "range": {"start": {"line": 8, "column": 3}}}, "severity": "ERROR"}

vagimeli marked this conversation as resolved.
Show resolved Hide resolved
This documentation focuses on using the OpenSeach Dashboards interface to connect to Prometheus.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"This page shows you how to use the..."?


## Prerequisites and permissions

Make sure you followed and configured [Prerequisites]({{site.url}}{{site.baseurl}}/dashboards/management/data-sources/#prerequisites) and [Permissions]({{site.url}}{{site.baseurl}}/dashboards/management/data-sources/#permissions).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe there may be boilerplate for this elsewhere that we should be consistent with. It should read something like "Make sure that you have configured all necessary prerequisites and permissions for/in order to..."



## Create a Prometheus data source connection

A data source connection specifies the parameters needed to connect to a data source. These parameters form a connection string for the data source. Using Dashboards, you can add new **Amazon S3** or **Prometheus** data source connections or manage existing ones.

The following steps guide you through the basics of creating a **Prometheus** data source connection:

1. From the OpenSearch Dashboards main menu, select **Management** > **Data sources** > **Create data source connection** > **Prometheus**. The UI is shown in the following image.

<img src="{{site.url}}{{site.baseurl}}/images/dashboards/data-source-Prometheus.png" alt="Connecting a data source UI" width="700"/>

2. Create the data source connection by entering the appropriate information into the **Configure Prometheus data source** fields.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
2. Create the data source connection by entering the appropriate information into the **Configure Prometheus data source** fields.
2. Create the data source connection by entering the appropriate information in the **Configure Prometheus data source** fields.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revised sentence to eliminate wordiness


- Under **Data source details**, enter a title and optionally description for this data source.
vagimeli marked this conversation as resolved.
Show resolved Hide resolved
- Under **Prometheus data location**, enter the Prometheus URI
vagimeli marked this conversation as resolved.
Show resolved Hide resolved
- Under **Authentication details**, 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:
- **Basic authentication**: A basic username and password are used to connect to the data source.
- **AWS Signature Version 4**: 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 in the **Service Name** list. The options are **Amazon OpenSearch Service** and **Amazon OpenSearch Serverless**. Lastly, enter the **Access Key** and **Secret Key** for authorization.
- Under **Query permissions**, choose which role is needed to search and index data from this data source. If **Restricted** is selected, additional field will become available which is used to configure the required role.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Under **Query permissions**, choose which role is needed to search and index data from this data source. If **Restricted** is selected, additional field will become available which is used to configure the required role.
- Under **Query permissions**, choose which role is needed in order to search and index data from this data source. If **Restricted** is selected, an additional field will become available that is used to configure the required role.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revised sentence to eliminate wordiness


3. When you have entered all the details, select **Review Configuration** > **Connect to Prometheus** to save your settings. The connection is created. The active window returns to the **Data sources** main page, and the new connection appears in the list of data sources.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
3. When you have entered all the details, select **Review Configuration** > **Connect to Prometheus** to save your settings. The connection is created. The active window returns to the **Data sources** main page, and the new connection appears in the list of data sources.
3. When you have entered all the information, select **Review Configuration** > **Connect to Prometheus** to save your settings. The connection is created. The active window returns to the **Data sources** main page, and the new connection appears in the list of data sources.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revised sentence to eliminate wordiness


### Modify a data source connection

To make changes to a data source connection, select a connection in the list on the **Data sources** main page. The **Connection Details** window opens.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To make changes to a data source connection, select a connection in the list on the **Data sources** main page. The **Connection Details** window opens.
To make changes to a data source connection, select a connection from the list on the **Data sources** main page. The **Connection Details** window opens.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revised sentence to eliminate wordiness


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.

Check warning on line 45 in _dashboards/management/connect-prometheus.md

View workflow job for this annotation

GitHub Actions / style-job

[vale] reported by reviewdog 🐶 [OpenSearch.Ampersand] Don't use an ampersand in place of 'and' in documentation. Raw Output: {"message": "[OpenSearch.Ampersand] Don't use an ampersand in place of 'and' in documentation.", "location": {"path": "_dashboards/management/connect-prometheus.md", "range": {"start": {"line": 45, "column": 15}}}, "severity": "WARNING"}

When **AWS Signature Version 4** 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.

To delete the data source connection, select the delete icon ({::nomarkdown}<img src="{{site.url}}{{site.baseurl}}/images/dashboards/trash-can-icon.png" class="inline-icon" alt="delete icon"/>{:/}).

## Create an index pattern

Once you've created a data source connection, you can create an index pattern for the data source. An _index pattern_ is a template that OpenSearch uses to create indexes for data from the data source. See [Index patterns]({{site.url}}{{site.baseurl}}/dashboards/management/index-patterns/) for more information and a tutorial.
63 changes: 18 additions & 45 deletions _dashboards/management/data-sources.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

This documentation focuses on using the OpenSeach Dashboards interface to connect and manage your data sources. For information about using an API to connect data sources, see the developer resources linked under [Next steps](#next-steps).


## Prerequisites

The first step in connecting your data sources to OpenSearch is to install OpenSearch and OpenSearch Dashboards on your system. You can follow the installation instructions in the [OpenSearch documentation]({{site.url}}{{site.baseurl}}/install-and-configure/index/) to install these tools.
Expand All @@ -19,61 +20,33 @@

Configuration of the [YAML files]({{site.url}}{{site.baseurl}}/install-and-configure/configuring-opensearch/#configuration-file) and installation of the `dashboards-observability` and `opensearch-sql` plugins is necessary. For more information, see [OpenSearch plugins]({{site.url}}{{site.baseurl}}/install-and-configure/plugins/).

## Permissions

To work with data sources in OpenSearch Dashboards, make sure that the user has been assigned the correct cluster-level [data source permission]({{site.url}}{{site.baseurl}}/security/access-control/permissions#data-source-permissions).



## Create a data source connection

A data source connection specifies the parameters needed to connect to a data source. These parameters form a connection string for the data source. Using Dashboards, you can add new data source connections or manage existing ones.

The following steps guide you through the basics of creating a data source connection:

1. From the OpenSearch Dashboards main menu, select **Management** > **Data sources** > **Create data source connection**. The UI is shown in the following image.

<img src="{{site.url}}{{site.baseurl}}/images/dashboards/data-source-UI.png" alt="Connecting a data source UI" width="700"/>
In order to securely store and encrypt data source connections in OpenSearch, you must add the following configuration to `opensearch.yml` files on all the nodes:
`plugins.query.datasources.encryption.masterkey: "YOUR_GENERATED_MASTER_KEY_HERE"`

2. Create the data source connection by entering the appropriate information into the **Connection Details** and **Authentication Method** fields.

- 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.
The master key must be 16, 24, or 32 characters long. You can use the following command to generate 24 characters master key:

Check failure on line 26 in _dashboards/management/data-sources.md

View workflow job for this annotation

GitHub Actions / style-job

[vale] reported by reviewdog 🐶 [OpenSearch.Inclusive] Use 'cluster manager' instead of 'master' because the latter is an offensive term. Raw Output: {"message": "[OpenSearch.Inclusive] Use 'cluster manager' instead of 'master' because the latter is an offensive term.", "location": {"path": "_dashboards/management/data-sources.md", "range": {"start": {"line": 26, "column": 5}}}, "severity": "ERROR"}
`openssl rand -hex 12`
Generating 12 bytes will result in a hexadecimal string that is 12 * 2 = 24 characters long
{: .note}

- 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.
- For AWS Signature Version 4 authentication, first specify the **Region**. Next, select the OpenSearch service in the **Service Name** list. The options are **Amazon OpenSearch Service** and **Amazon OpenSearch Serverless**. Lastly, enter the **Access Key** and **Secret Key** for authorization.

After you have populated the required fields, the **Test connection** and **Create data source** buttons become active. You can select **Test connection** to confirm that the connection is valid.

3. Select **Create data source** to save your settings. The connection is created. The active window returns to the **Data sources** main page, and the new connection appears in the list of data sources.

4. To delete a data source connection, select the checkbox to the left of the data source **Title** and then select the **Delete 1 connection** button. Selecting multiple checkboxes for multiple connections is supported. An example UI is shown in the following image.

<img src="{{site.url}}{{site.baseurl}}/images/dashboards/delete-data-source.png" alt="Deleting a data source UI" width="700"/>

### Modify a data source connection

To make changes to a 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.
## Permissions

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.
To work with data sources in OpenSearch Dashboards, make sure that the user has been assigned the correct cluster-level [data source permission]({{site.url}}{{site.baseurl}}/security/access-control/permissions#data-source-permissions).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data source "permissions" (plural)?

vagimeli marked this conversation as resolved.
Show resolved Hide resolved

To delete the data source connection, select the delete icon ({::nomarkdown}<img src="{{site.url}}{{site.baseurl}}/images/dashboards/trash-can-icon.png" class="inline-icon" alt="delete icon"/>{:/}).
## Types of data streams

## Create an index pattern
There are two ways to configure data sources

Once you've created a data source connection, you can create an index pattern for the data source. An _index pattern_ is a template that OpenSearch uses to create indexes for data from the data source. See [Index patterns]({{site.url}}{{site.baseurl}}/dashboards/management/index-patterns/) for more information and a tutorial.
1. **Management** -> **Dashboards Management** -> **Data sources**

Can be used for OpenSearch Data Stream Connections, further details are available at [Configuring and using multiple data sources]({{site.url}}{{site.baseurl}}/dashboards/management/multi-data-sources/)
2. **Management** -> **Data sources**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if this is accurate anymore, since I think these two pages merged?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@derek-ho As far as I'm aware the pages are due to be merged in future versions, possibly 2.17, the current state (from 2.11 to current) is still via two separate pages.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have merged the experience in 2.16. So this is correct.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the confusion, @AntonEliatra! They DID make changes in 2.16 to the UI. Since the release is today (8/7), you should be able to see the updates tomorrow in the playground for testing purposes. In addition, @RyanL1997 is going to capture a video of the new flow and add it to a doc issue.

We'll have to update the rest of documentation for the new changes post-2.16.

Copy link
Collaborator

@vagimeli vagimeli Aug 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RyanL1997 I don't see the option Management > Data sources in my local environment running 2.16. I only have the option to go through Dashboards Management. Please let me know if Management > Data sources is available in 2.16. Please review lines 39--41 and make any necessary changes for technical accuracy.


Can be used to connect Amazon S3, see [Connecting Amazon S3 to OpenSearch]({{site.url}}{{site.baseurl}}/dashboards/management/S3-data-source/) and Prometheus, see [Connecting Prometheus to OpenSearch]({{site.url}}{{site.baseurl}}/dashboards/management/connect-prometheus/).

## Next steps

- Learn about [managing index patterns]({{site.url}}{{site.baseurl}}/dashboards/management/index-patterns/) through OpenSearch Dashboards.
- Learn about [indexing data using Index Management]({{site.url}}{{site.baseurl}}/dashboards/im-dashboards/index/) through OpenSearch Dashboards.
- Learn about how to connect [multiple data sources]({{site.url}}{{site.baseurl}}/dashboards/management/multi-data-sources/).
- Learn about how to [connect OpenSearch and Amazon S3 through OpenSearch Dashboards]({{site.url}}{{site.baseurl}}/dashboards/management/S3-data-source/).
- Learn about the [Integrations]({{site.url}}{{site.baseurl}}/integrations/index/) tool, which gives you the flexibility to use various data ingestion methods and connect data from the Dashboards UI.

- Learn about the [Integrations]({{site.url}}{{site.baseurl}}/integrations/index/) tool, which gives you the flexibility to use various data ingestion methods and connect data from the Dashboards UI.
AntonEliatra marked this conversation as resolved.
Show resolved Hide resolved
Binary file added images/dashboards/data-source-Prometheus.png

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this one we may need to change the picture. Since the old datasource in observability has been unregistered

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

User can use the create button and navi to the card view for selection:
Screenshot 2024-07-31 at 10 21 03 AM
Screenshot 2024-07-31 at 10 21 13 AM

Copy link
Contributor Author

@AntonEliatra AntonEliatra Aug 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RyanL1997 Which version of OS are you using? With 2.15 I'm not able to see the view that you pasted above.
Screenshot 2024-08-01 at 17 41 31

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AntonEliatra: The screenshots are from 2.16. We should be releasing in the next couple of days.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Naarcha-AWS Should I change the version in the PR details to 2.15, as this will still be relevant?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the confusion, @AntonEliatra! They DID make changes in 2.16 to the UI. Since the release is today (8/7), you should be able to see the updates tomorrow in the playground for testing purposes. In addition, @RyanL1997 is going to capture a video of the new flow and add it to a doc issue.

We'll have to update the rest of documentation for the new changes post-2.16.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi folks, thanks for the fast follow up and here is the issue I created with some details of flow diffs: #7948, feel free to drop some comments/thoughts if you have some questions. Thanks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm working on updating the documentation based on the above. I think some effort is needed in explaining the difference between Zero-ETL and Managed Data Streams (MDS) before jumping into "How-to", as this can be a point of confusion for many users

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RyanL1997 are you able to confirm when does the user need to configure :
plugins.query.datasources.encryption.masterkey

Copy link
Collaborator

@vagimeli vagimeli Aug 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm working on updating the documentation based on the above. I think some effort is needed in explaining the difference between Zero-ETL and Managed Data Streams (MDS) before jumping into "How-to", as this can be a point of confusion for many users

@AntonEliatra @RyanL1997 Suggested text: When the multiple data sources feature is disabled (data_source.enabled: false), you can only see and work with local, unmanaged data sources on your cluster, and cannot work with or manage multiple data sources.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/dashboards/data-source-UI.png
Binary file not shown.
Binary file removed images/dashboards/delete-data-source.png
Binary file not shown.
Loading