sql: [BUG] Observability-Metrics fails to render page with Prometheus data source metric selected
What is the bug? With a Prometheus data source added the Observability -> Metrics will show the available metrics from this data source. However when a metric is selected the page becomes mostly empty and errors are thrown in the browser console.
How can one reproduce the bug? Steps to reproduce the behavior:
- Create a Prometheus data source (below ran from Dev Tools)
POST _plugins/_query/_datasources
{
"name": "prometheus",
"connector": "prometheus",
"properties": {
"prometheus.uri": "https://prometheus.url.com/",
"prometheus.auth.type": "basicauth",
"prometheus.auth.username": "username",
"prometheus.auth.password": "password"
},
"allowedRoles": []
}
-
Navigate to Observability -> Metrics
-
Wait for the list of available metrics to populate
-
Click on any metric, a moment later the page clears
When the page clears the following errors present in the browser console
What is the expected behavior? When a metric is selected from Observability -> Metrics I expect to see a summary of the metric similar to the screenshots in https://opensearch.org/docs/latest/observing-your-data/prometheusmetrics/
What is your host/environment?
- OS: Docker deployed on CentOS7
- Version 2.12.0
- Browser: Chrome version 122.0.6261.95 (Official Build) (64-bit)
- Relevant Plugins: opensearch-sql version 2.12.0.0 opensearch-observability version 2.12.0.0
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 3
- Comments: 15 (5 by maintainers)
This surfaced up again in current main and 2.14, which is introduced by: https://github.com/opensearch-project/dashboards-observability/pull/1739. We just did the fixes in main:
I was also unable. I think our only current course of action is to wait until 2.14 releases. Here’s the current release schedule: https://opensearch.org/releases.html
I can’t even make it this far. I’ve got prometheus and the node_exporter running, but setting up the data source then viewing data sources fails.
Following the instructions here will get you to this point: https://opensearch.org/docs/latest/observing-your-data/prometheusmetrics/