hastic-zzz / hastic-server

Hastic data management server for analyzing patterns and anomalies from Grafana
GNU General Public License v3.0
330 stars 23 forks source link

Datasource time field is not available #874

Open tuapuikia opened 4 years ago

tuapuikia commented 4 years ago

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

rozetko commented 4 years ago

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

tuapuikia commented 4 years ago

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

image

tuapuikia commented 4 years ago

The error is from datasource library.

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

tuapuikia commented 4 years ago

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.

jonyrock-back commented 4 years ago

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