Add support for elasticsearch 6 input
Feature Request
Support for Elasticsearch 6.x for input / output plugins.
Current behavior:
Not available
Desired behavior:
Support ES6.x release
Use case:
new version of ES 6.x does not support types in mapping any more and it affects monitoring.
What happens when you try to use the current plugins?
There are issues related to fields with data type string and text. It needs default mappings of extracted data to be in sync.
We updated to ES 6.x and all of our ES monitoring is now borked
UPDATE: if someone comes across this - if I don't specify node_stats and leave the deafult (not configured) - it seems to be working
Isn't this a matter of changing the output plugin to use import "gopkg.in/olivere/elastic.v6"? instead of v5?
@mping Can you test this and let me know?
@danielnelson I'll reach our devops to see how we can check that out
@mping @danielnelson Are there any news on this issue? Is it worth testing Telegraf with ES 6.x or are there definitely breaking changes?
@matthenning I would expect breaking changes based on the above comments.
Regarding the input plugin, I'm getting mostly null values in the series fields of measurement elasticsearch_indices. Using ES 6.2.2.
Seems that the plugin does not collect index specific stats, it does not query the /_stats/ API. I could try to add this, but between this issue and #2711 I'm honestly not sure of the current status and direction for ES6 support in Telegraf. Any pointers on best approach to help with this at this point?
@voiprodrigo Do you think you could create a list of the changes between v5 and v6? Only with respect to the metrics we currently collect. I think we will want to support both of these for a while more.
tracking the output plugin here: https://github.com/influxdata/telegraf/issues/4268
It seems that you can pass an argument level to the query _nodes/stats or /_nodes/_local/stats with the value indices, and you get a subfields indices , child of the regular indices field, where each key is the index name, and the value is an object with the stats corresponding to this index.
As an example you can try /_nodes/_local/stats?level=indices&pretty', it works on ES 6.4, and should work on ES 6.x.
https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html
I don't know how previous versions of elasticsearch behave, but it seems that the parameters didn't exist by then, and that the behaviour was to
returns high level aggregation and index level stats for all indices https://www.elastic.co/guide/en/elasticsearch/reference/5.5/indices-stats.html
Hope that can help.
Its still not clear for me what is broken now since ES 6.
I tried the latest Telegraf on ES 6, and I get correct metrics. Compared some output to ES 5 output, and its 100% the same ...
Can somebody be clear please? Give me exact examples of missing metrics/tags. Then I can have a look to fix this. But currently, I really don't see an issue.
@kri5 : But more recent versions mention:
By default, all stats are returned, returning only specific stats can be specified as well in the URI. Those stats can be any of:
So nothing needed to fix this ... It returns the indices stats already without adding 'level'
I think the mentioned problems only manifest when using ES 7. In ES 6 those issues only throw a deprecation notice.
@matthenning: Just setup an ES 7.2 via docker. And seems to work fine on first check ... Guess we still need a clear stat/call/whatever that doesn't work, cause its still not clear :(
@dupondje My bad, I was thinking output plugins.
I think we should close this issue, in general this seems to be working and new issues can be created for any specific bugs that might remain.