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
Use index prefix for template index pattern in ElasticMeterRegistry #2197
Conversation
Hi, I'm not 100% sure, if this is the cause, but it seems related. The build produced from this |
" \"index_patterns\": [\"metrics*\"],\n" + | ||
private static final Function<String, String> TEMPLATE_BODY_BEFORE_VERSION_7 = (indexPrefix) -> "{\"template\":\"" + indexPrefix + "*\",\"mappings\":{\"_default_\":{\"_all\":{\"enabled\":false}," + TEMPLATE_PROPERTIES + "}}}"; | ||
private static final Function<String, String> TEMPLATE_BODY_AFTER_VERSION_7 = (indexPrefix) -> "{\n" + | ||
" \"index_patterns\": [\"" + indexPrefix + "*\"],\n" + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually though, I think the pattern should include config.indexDateSeparator()
Otherwise, the index is foo-2020-07-20
but the pattern is foo*
, potentially matching foobar-2020-07-20
as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just saw that my comment was still pending. I'll post it anyway now :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@micheljung Thanks! I created #2405 to try to resolve it.
This PR changes to use index prefix for template index pattern in
ElasticMeterRegistry
.Closes gh-2196