Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Elasticsearch indexes variable ... #8

Closed

Conversation

nzlosh
Copy link

@nzlosh nzlosh commented Mar 11, 2015

... to avoid querying indexes which do not have the expected document fields.

Problem description

When queries are run against the Elasticsearch cluster, no index option is provided. In this case, the underlying library defaults to "_all". This is problematic when the ES cluster has indexes which don't contain documents with the field @timestamp. An Exception is raised by Elasticsearch like the example below: (query masked for privacy reasons)

Caused by: org.elasticsearch.search.SearchParseException: [kibana-int][0]: query[XXXXXXXX],from[-1],size[1]: Parse Failure [No mapping found for [@timestamp] in order to sort on]

Fix

By explicitly providing the list of indexes to run the query against, the above error is avoid. The indexes variable is optional for the logstash configuration. If the variable is not set in the configuration, an empty string is supplied by the plugin and the underlying library will use the original behaviour of querying "_all".

@jdve
Copy link

jdve commented Apr 6, 2015

👍

@nzlosh nzlosh force-pushed the fix_search_parse_exception branch from 738c9f3 to 549ea88 Compare July 10, 2015 20:11
@nzlosh nzlosh force-pushed the fix_search_parse_exception branch from 549ea88 to 36eac22 Compare July 10, 2015 20:18
@elasticsearch-release
Copy link

Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run; then say 'jenkins, test it'.

@ghost
Copy link

ghost commented Apr 18, 2016

+1

@purbon
Copy link

purbon commented Jun 16, 2016

Apologies for taking such a long time to come back here, I'm doing some mantainance on this plugin and will be closing this in benefit of #31 as it provides a similar solution but include some other stuff into also. Thanks a lot for your contribution. Will be soon releasing a new version that will include all the pending requests here.

@purbon purbon closed this Jun 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants