What is the bug?
When using Prometheus query API with scalar functions like scalar(count(up)), the API returns a 500 internal server error instead of the expected result.
How can one reproduce the bug?
- Add a Prometheus data source
- Run a PROMQL query that returns a scalar result type:
curl -X 'POST' -H 'Content-Type:application/json' --data-binary '{
"query": "scalar(count(up))",
"language": "PROMQL",
"options": {
"queryType": "instant",
"time": "1773874502"
}
}' 'localhost:9200/_plugins/_directquery/_query/my_prometheus'
What is the expected behavior?
The query should return the scalar result without error.
What is your host/environment?
OpenSearch 2.19
What is the bug?
When using Prometheus query API with scalar functions like
scalar(count(up)), the API returns a 500 internal server error instead of the expected result.How can one reproduce the bug?
What is the expected behavior?
The query should return the scalar result without error.
What is your host/environment?
OpenSearch 2.19