Grafana 6.1.4 502 error connecting to elasticsearch 7.0.0 datasource

I updated to the latest version of docker container sebp/elk on 4/17/2019. Since then I have been unable to get Telegraf to start on my host. It fails connecting to Elasticsearch. I also get a 502 error connecting to Elasticsearch from Grafana. I have removed all containers and images and re-pulled. I also deleted all data in mount points to start clean and still am unable to connect. The only change I am aware of that was made on 4/17/2019 was the upgrade of sebp/elk.

I am out of ideas on what to look at next.

I am running the following versions:
Grafana 6.1.4 (docker container)
Elasticsearch 7.0.0
Telegraf is 1.10.3 (runs locally on host)
InfluxDB 1.7.6 (runs locally on host)
Docker 18.09.2
Windows 10.0.17763.437

From http://localhost:9200 I get
"name" : "elk",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "ov0z53EQQRyVr2DmDETqCg",
"version" : {
"number" : "7.0.0",
"build_flavor" : "default",
"build_type" : "tar",
"build_hash" : "b7e28a7",
"build_date" : "2019-04-05T22:55:32.697037Z",
"build_snapshot" : false,
"lucene_version" : "8.0.0",
"minimum_wire_compatibility_version" : "6.7.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
"tagline" : "You Know, for Search"

Grafana config for Elasticsearch data source config

Telegraf log:
2019-04-27T12:31:04Z I! Loaded inputs: win_perf_counters docker
2019-04-27T12:31:04Z I! Loaded aggregators:
2019-04-27T12:31:04Z I! Loaded processors:
2019-04-27T12:31:04Z I! Loaded outputs: influxdb elasticsearch
2019-04-27T12:31:04Z I! Tags enabled: host=DESKTOP-1ND49C8
2019-04-27T12:31:04Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"DESKTOP-1ND49C8", Flush Interval:10s
2019-04-27T12:31:04Z I! Elasticsearch version: 7.0.0
2019-04-27T12:31:04Z E! [agent] Failed to connect to output elasticsearch, retrying in 15s, error was 'Elasticsearch failed to create index template telegraf : elastic: Error 400 (Bad Request): Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters: [ default : {dynamic_templates=[{tags={path_match=tag. , mapping={ignore_above=512, type=keyword}, match_mapping_type=string}}, {metrics_long={mapping={index=false, type=float}, match_mapping_type=long}}, {metrics_double={mapping={index=false, type=float}, match_mapping_type=double}}, {text_fields={mapping={norms=false}, match= }}], _all={enabled=false}, properties={@timestamp={type=date}, measurement_name={type=keyword}}}] [type=mapper_parsing_exception]'

I think this indicates that this version of Telegraf is incompatible with Elasticsearch 7. Specifically, it seems to be using the _default_ mapping which was deprecated some time ago and is no longer supported.

I cannot see an open issue about this in Telegraf's issue tracker but perhaps you could open one?

Thanks fore the reply David Turner. I can open an issue there as well. I guess also open one on Grafana's issue tracker as to why it cannot connect either?

I may roll back to an earlier version of the container with Elasticsearch 6 and wait for the compatibility issues with others apps and Elasticsearch 7 to be resolved by others. Not sure I want to be the tip of the spear on this one. :wink:

I'm not sure exactly what you mean by "roll back", but note that Elasticsearch doesn't support downgrading. Once the data directory has been touched by an Elasticsearch 7 node it won't work with an earlier version any more.

Of course, no problem.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.