quickwit-oss / quickwit-datasource

Quickwit data source for Grafana
GNU Affero General Public License v3.0
41 stars 10 forks source link

Handling several indexes per datasource #2

Open fmassot opened 1 year ago

fmassot commented 1 year ago

Currently, a quickwit datasource requires to define an index.

We want a user to be able to query different indexes (using the index pattern) or query multiple indexes with a single datasource.

Here is the proposed spec.

Datasource parameters

Query builder

We should add an index field filled with the default value in the query builder.

Validation

If an index or index pattern is defined, we can validate the timestamp field and timestamp field output format.

ddelemeny commented 7 months ago

Knowing the timefield is a requirement at request time, but with an index pattern it is impossible to know what the field is because index metadata can't be retrieved.

A solution would be to use a known alias for the field ($__timefield, auto), and have quickwit infer the value.