Skip to content

Conversation

@joshuali925
Copy link
Member

Description

This PR builds on top of #3440. To review it please ignore commit ac6059f, or wait for #3440 to be merged.

This PR exposes ExecuteDirectQuery and GetDirectQueryResources the REST and transport actions to OpenSearch.

Sample query request:

POST /_plugins/_directquery/_query/my_prometheus
Content-Type: application/json

{
  "query": "process_cpu_seconds_total",
  "language": "PROMQL",
  "sourceVersion": "v1",
  "maxResults": 1000,
  "timeout": 30,
  "sessionId": "1234",
  "options": {
    "queryType": "range",
    "start": "1741124895",
    "end": "1741128495",
    "step": "14"
  }
}

Sample resources request:

GET /_plugins/_directquery/_resources/my_prometheus/api/v1/rules

This PR is missing integration tests and documentations

Related Issues

Resolves #[Issue number to be closed when this PR is merged]

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • New functionality has javadoc added.
  • New functionality has a user manual doc added.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

joshuali925 and others added 2 commits March 31, 2025 20:06
@joshuali925 joshuali925 force-pushed the prometheus/direct-query branch from 63f6b33 to 2bdddb6 Compare March 31, 2025 23:54
@opensearch-trigger-bot
Copy link
Contributor

This PR is stalled because it has been open for 30 days with no activity.

@RyanL1997
Copy link
Collaborator

Hi @joshuali925 , do we still need this?

@joshuali925
Copy link
Member Author

#3440 (comment)

we do, but currently no bandwidth

goyamegh pushed a commit to goyamegh/sql that referenced this pull request Jun 2, 2025
This commit cherry-picks the changes from pull request opensearch-project#3441 (commit 2bdddb6) into the main-3441 branch.

The original PR added a direct-query module for Prometheus integration.
@opensearch-trigger-bot
Copy link
Contributor

This PR is stalled because it has been open for 30 days with no activity.

@joshuali925 joshuali925 changed the base branch from main to feature/direct-query-prometheus September 4, 2025 19:04
@joshuali925 joshuali925 merged commit 81b8896 into opensearch-project:feature/direct-query-prometheus Sep 4, 2025
19 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants