telegraf icon indicating copy to clipboard operation
telegraf copied to clipboard

Add support for elasticsearch 6 input

Open ajaybhatnagar opened this issue 8 years ago • 18 comments

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.

ajaybhatnagar avatar Jan 02 '18 18:01 ajaybhatnagar

What happens when you try to use the current plugins?

danielnelson avatar Jan 02 '18 19:01 danielnelson

There are issues related to fields with data type string and text. It needs default mappings of extracted data to be in sync.

ajaybhatnagar avatar Jan 02 '18 19:01 ajaybhatnagar

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

bfgoodrich avatar Jan 10 '18 21:01 bfgoodrich

Isn't this a matter of changing the output plugin to use import "gopkg.in/olivere/elastic.v6"? instead of v5?

mping avatar Feb 06 '18 10:02 mping

@mping Can you test this and let me know?

danielnelson avatar Feb 09 '18 22:02 danielnelson

@danielnelson I'll reach our devops to see how we can check that out

mping avatar Feb 16 '18 10:02 mping

@mping @danielnelson Are there any news on this issue? Is it worth testing Telegraf with ES 6.x or are there definitely breaking changes?

rustyricky avatar Apr 09 '18 12:04 rustyricky

@matthenning I would expect breaking changes based on the above comments.

danielnelson avatar Apr 09 '18 22:04 danielnelson

Regarding the input plugin, I'm getting mostly null values in the series fields of measurement elasticsearch_indices. Using ES 6.2.2.

voiprodrigo avatar Apr 10 '18 00:04 voiprodrigo

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 avatar Apr 10 '18 10:04 voiprodrigo

@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.

danielnelson avatar Apr 11 '18 01:04 danielnelson

tracking the output plugin here: https://github.com/influxdata/telegraf/issues/4268

russorat avatar Jun 11 '18 21:06 russorat

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.

kri5 avatar Aug 27 '18 08:08 kri5

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'

dupondje avatar Jul 02 '19 12:07 dupondje

I think the mentioned problems only manifest when using ES 7. In ES 6 those issues only throw a deprecation notice.

rustyricky avatar Jul 02 '19 13:07 rustyricky

@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 avatar Jul 02 '19 15:07 dupondje

@dupondje My bad, I was thinking output plugins.

rustyricky avatar Jul 03 '19 07:07 rustyricky

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.

danielnelson avatar Jul 03 '19 17:07 danielnelson