hastic-server icon indicating copy to clipboard operation
hastic-server copied to clipboard

Datasource time field is not available

Open tuapuikia opened this issue 4 years ago • 5 comments

When I use elasticsearch as data source. I get following error,

hastic-server-0 hastic-server LEARNING started for xxxx hastic-server-0 hastic-server query time range: from Fri Mar 06 2020 07:59:26 GMT+0000 (UTC) to Fri Mar 06 2020 08:59:26 GMT+0000 (UTC) hastic-server-0 hastic-server Error: datasource time field not found hastic-server-0 hastic-server at /var/www/server/dist/server.js:9:165359 hastic-server-0 hastic-server at Generator.next () hastic-server-0 hastic-server at s (/var/www/server/dist/server.js:9:160447) hastic-server-0 hastic-server at

tuapuikia avatar Mar 06 '20 09:03 tuapuikia

Hey @tuapuikia

What ElasticSearch version are you using?

Please attach screenshot of your metric with "Hastic Info" tab opened, like this: image You can blur sensitive info out if it's necessary

rozetko avatar Mar 06 '20 09:03 rozetko

Hi, My Elasticsearch version is 7.6.0. fixed the screenshot.

image

tuapuikia avatar Mar 06 '20 10:03 tuapuikia

The error is from datasource library.

https://github.com/CorpGlory/grafana-datasource-kit/blob/772688965bab3fb4df0ed809aabb4129a95de740/src/metrics/elasticsearch_metric.ts#L62

tuapuikia avatar Mar 06 '20 13:03 tuapuikia

It works if i'm using average data instead of count data. I convert some of my data in ES to integer to resolve this.

tuapuikia avatar Mar 07 '20 05:03 tuapuikia

@tuapuikia good research! would you share your original and fixed query to elastic? That would help.

jonyrock-back avatar Mar 07 '20 14:03 jonyrock-back