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

Add support for time_series_dimension flag in _elastic/{index}/_field_caps API method #5003

Open
kuzaxak opened this issue May 18, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@kuzaxak
Copy link

kuzaxak commented May 18, 2024

Opensearch Dashboards calling _field_caps to build an index pattern. To use quickwit natively as an external data source for it dashboards need to determine a timestamp field to render histogram, such fields listed on index pattern settings page. For that it relies on a time_series_dimension flag in <field>.<type>.time_series_dimension.

Link to the doc.

Describe the solution you'd like

Filed chosen as timestamp_field in index should be marked as time_series_dimension in _field_caps output.

Describe alternatives you've considered

I've made a little proxy to query /api/v1/indexes?index_id_patterns= and patch response of _field_caps method.

Additional context

I'm working on integrating quickwit as an Opensearch Dashboards backend to replace existing setup which is using regular Opensearch.

@kuzaxak kuzaxak added the enhancement New feature or request label May 18, 2024
kuzaxak added a commit to x-qdo/quickwit that referenced this issue May 18, 2024
`time_series_dimension` determine whether field will be used by Opensearch Dashboards to build histogram or not.

Fixing issue: quickwit-oss#5003
@fulmicoton
Copy link
Contributor

@kuzaxak have you started experimenting with adding opendashboard support by any chance? I'd love to exchange if you have more info on other missing pieces.

@kuzaxak
Copy link
Author

kuzaxak commented May 18, 2024

@kuzaxak have you started experimenting with adding opendashboard support by any chance? I'd love to exchange if you have more info on other missing pieces.

Yes, I was able to migrate our Opensearch dashboard completely to quickwit backend. But I'm using a proxy to monkey patch some responses of quickwit.

I can share a proxy code, it is a simple python flask app.

@kuzaxak
Copy link
Author

kuzaxak commented May 18, 2024

@fulmicoton here you can find a proxy server code.

I'm using quickwit as an external source not to deal with auth, dashboards storage, etc.

  1. Enable this feature for OSD:
data_source.enabled: true
  1. Add proxy as an additional datasource:
image
  1. Add Index pattern using external source:
image

This way I'm using security features and SAML from OSD and logs storage and querying from Quickwit.

kuzaxak added a commit to x-qdo/quickwit that referenced this issue May 22, 2024
`time_series_dimension` determine whether field will be used by Opensearch Dashboards to build histogram or not.

Fixing issue: quickwit-oss#5003
@fulmicoton
Copy link
Contributor

@kuzaxak That's absolutely awesome, thank you for sharing the script, the approach and the screenshot, The hack is really cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants