Skip to content

fix error using date based index on elasticsearch #267

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

Merged

Conversation

aya
Copy link
Contributor

@aya aya commented Dec 1, 2020

Thanks to @comel, this PR fixes #180 Elasticsearch indice with date error

* Using date based indexes with elasticsearch output plugin raises following error :
Error in Elasticsearch request:  source="logsene-js" err={"message":"HTTP status code:400 Error: {\"type\":\"invalid_index_name_exception\",\"reason\":\"Invalid index name [test-YYYY-MM-DD], must be lowercase\",\"index_uuid\":\"_na_\",\"index\":\"test-YYYY-MM-DD\"}","httpStatus":400,"httpBody":{"_index":"test-YYYY-MM-DD","_type":"logs","_id":null,"status":400,"error":{"type":"invalid_index_name_exception","reason":"Invalid index name [test-YYYY-MM-DD], must be lowercase","index_uuid":"_na_","index":"test-YYYY-MM-DD"}},"url":"http://logger-db:9200/test-2020-02-04/_bulk"} /  message="HTTP status code:400 Error: {\"type\":\"invalid_index_name_exception\",\"reason\":\"Invalid index name [test-YYYY-MM-DD], must be lowercase\",\"index_uuid\":\"_na_\",\"index\":\"test-YYYY-MM-DD\"}" httpStatus=400 httpBody={"_index":"test-YYYY-MM-DD","_type":"logs","_id":null,"status":400,"error":{"type":"invalid_index_name_exception","reason":"Invalid index name [test-YYYY-MM-DD], must be lowercase","index_uuid":"_na_","index":"test-YYYY-MM-DD"}} url="http://logger-db:9200/test-2020-02-04/_bulk"
Copy link
Contributor

@adnanrahic adnanrahic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for this!
There is only one tiny linting edit I'd really like to see.
Then we can go ahead and merge it!

Applying suggestions from code review

Co-authored-by: Adnan Rahić <[email protected]>
@aya
Copy link
Contributor Author

aya commented Dec 10, 2020

I applied you suggestions in latest commit, thanks for review !

@adnanrahic adnanrahic self-requested a review December 11, 2020 10:10
@adnanrahic
Copy link
Contributor

Sweet! Thanks for the contribution. I'll merge this now.

@adnanrahic adnanrahic merged commit db2efad into sematext:master Dec 11, 2020
@aya aya deleted the fix/180-elasticsearch-indice-with-date-error branch December 16, 2020 12:32
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.

Elasticsearch indice with date error
2 participants