You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of today, the Time Series Visual Builder (TSVB) - a data visualization tool in Dashboards - does not support remote data connections. However, Dashboards can connect to any remotely located OpenSearch instance through connections created using the data source feature.
Background
Currently TSVB is tightly integrated with OpenSearch. TSVB directly queries OpenSearch to retrieve the time-series data needed for visualization. TSVB relies on index patterns defined in OpenSearch-Dashboards to identify the OpenSearch indices containing the relevant data.
There are two APIs /api/metrics/fields and /api/metrics/vis/data which are part of the Time Series Visual Builder (TSVB) plugin in OpenSearch-Dashboards. They are used for fetching field metadata and metric data for visualizations, respectively.
/api/metrics/fields: This API endpoint is responsible for providing information about the fields available in the indices that TSVB can query. It returns metadata such as the data type, format, and other properties of the fields. This information is crucial for configuring TSVB visualizations as it helps users understand the structure of the data they are working with.
/api/metrics/vis/data: This API endpoint is used to retrieve metric data for TSVB visualizations. It allows users to specify parameters such as the time range, interval, and other options to fetch the relevant metric data from OpenSearch. The data retrieved from this endpoint is then used to render the TSVB visualization in the OpenSearch-Dashboards.
These APIs are essential for the functionality of TSVB as they enable users to interact with OpenSearch and fetch the data needed for creating and displaying time-series visualizations in Dashboards. To enable TSVB to connect and retrieve data from a remote cluster, we need to add support for data sources within these two APIs.
Solution
1] Modify Index Pattern selector under Panel Options and Annotation:
The current input type of the Index pattern selector in TSVB is a text field. We need to extend the functionality of this text fields to support index pattern of format [Data Source]::[Index Pattern].
2] Modify /api/metrics/fields to accept dataSourceId as query parameter:
3] Modify /api/metrics/vis/data to accept dataSourceId as query parameter:
/api/metrics/vis/data uses data plugin for search and query OpenSearch. Data plugin already have capability to accept dataSourceID and decide client based on context and request.
For 1st point in proposed solution, instead of extending the functionality of this text fields to support index pattern of format [Data Source]::[Index Pattern], use same component which is being used in Discover.
The text was updated successfully, but these errors were encountered:
Problem Statement
As of today, the Time Series Visual Builder (TSVB) - a data visualization tool in Dashboards - does not support remote data connections. However, Dashboards can connect to any remotely located OpenSearch instance through connections created using the data source feature.
Background
Currently TSVB is tightly integrated with OpenSearch. TSVB directly queries OpenSearch to retrieve the time-series data needed for visualization. TSVB relies on index patterns defined in OpenSearch-Dashboards to identify the OpenSearch indices containing the relevant data.
There are two APIs
/api/metrics/fields
and/api/metrics/vis/data
which are part of the Time Series Visual Builder (TSVB) plugin in OpenSearch-Dashboards. They are used for fetching field metadata and metric data for visualizations, respectively./api/metrics/fields
: This API endpoint is responsible for providing information about the fields available in the indices that TSVB can query. It returns metadata such as the data type, format, and other properties of the fields. This information is crucial for configuring TSVB visualizations as it helps users understand the structure of the data they are working with./api/metrics/vis/data
: This API endpoint is used to retrieve metric data for TSVB visualizations. It allows users to specify parameters such as the time range, interval, and other options to fetch the relevant metric data from OpenSearch. The data retrieved from this endpoint is then used to render the TSVB visualization in the OpenSearch-Dashboards.These APIs are essential for the functionality of TSVB as they enable users to interact with OpenSearch and fetch the data needed for creating and displaying time-series visualizations in Dashboards. To enable TSVB to connect and retrieve data from a remote cluster, we need to add support for data sources within these two APIs.
Solution
1] Modify Index Pattern selector under Panel Options and Annotation:
The current input type of the Index pattern selector in TSVB is a text field. We need to extend the functionality of this text fields to support index pattern of format [Data Source]::[Index Pattern].
2] Modify
/api/metrics/fields
to acceptdataSourceId
as query parameter:2.1 Add data source id as query parameter
OpenSearch-Dashboards/src/plugins/vis_type_timeseries/server/routes/fields.ts
Lines 36 to 43 in 2c8d9d3
2.2 And then pass to getFields
OpenSearch-Dashboards/src/plugins/vis_type_timeseries/server/routes/fields.ts
Line 46 in 2c8d9d3
2.3 Then inside getFields, based on dataSourceId, we need to IndexPatternsFetcher with correct client.
OpenSearch-Dashboards/src/plugins/vis_type_timeseries/server/lib/get_fields.ts
Lines 58 to 61 in 2c8d9d3
3] Modify
/api/metrics/vis/data
to acceptdataSourceId
as query parameter:/api/metrics/vis/data
uses data plugin for search and query OpenSearch. Data plugin already have capability to accept dataSourceID and decide client based on context and request.3.1 Add data source id as query parameter
OpenSearch-Dashboards/src/plugins/vis_type_timeseries/server/routes/vis.ts
Lines 45 to 51 in 2c8d9d3
3.2 Then pass
dataSourceId
to search.OpenSearch-Dashboards/src/plugins/vis_type_timeseries/server/lib/search_strategies/strategies/abstract_search_strategy.ts
Lines 74 to 82 in 2c8d9d3
Alternate Solution
For 1st point in proposed solution, instead of extending the functionality of this text fields to support index pattern of format [Data Source]::[Index Pattern], use same component which is being used in Discover.
The text was updated successfully, but these errors were encountered: