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

Default Logstash index pattern should be "[logstash-]YYYY.MM.DD", not "logstash-*" #5447

Closed
cjchand opened this issue Nov 19, 2015 · 2 comments

Comments

@cjchand
Copy link

cjchand commented Nov 19, 2015

In the course of troubleshooting poor ES performance for one of our ELK stacks, I ultimately figured out that the default index pattern for Logstash is very sub-optimal.

In the Kibana code, it is set as this in multiple places: logstash-*

Because of this, even if I search just the past 15 minutes all queries search across all indices. This can cause alot of unneeded churn in ES, leading to heap bloat and eventually alot of GC.

If you look at this default in Kibana's UI, then click the "Use event times to create index names" checkbox, the pattern changes to what it really should default to: [logstash-]YYYY.MM.DD.

How I happened to come across this is that ES was puking, citing indices that had nothing to do with the timeframe I was querying. Once I made the change above, performance improved dramatically and resource usage by ES was much lower.

This is basically the same thing as the timestamping setting for Kibana 3 dashboards, which I recall seeing somewhere as a best practice, for the exact same reasons as above.

In short: If you're gonna pre-populate a default to work with Logstash, make it a good default :)

Hope that helps and thanks in advance!

@epixa
Copy link
Contributor

epixa commented Nov 19, 2015

@cjchand Kibana 4.3.0 should address this for you: it automatically optimizes wildcard index patterns such as logstash-* in the same way that you could previously only achieve by manually configuring a time-based index pattern name that matches your underlying indexing scheme (e.g. [logstash-]YYYY.MM.DD).

If you want more details about this, check out the original ticket #4342. There is a comment linked from the main description that goes into more detail about the underlying changes.

Thanks for the in-depth ticket!

@epixa epixa closed this as completed Nov 19, 2015
@cjchand
Copy link
Author

cjchand commented Nov 19, 2015

Crud. I tried searching before I opened this, but didn't find any matches.

Sorry about that and thanks for the quick reply!

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

No branches or pull requests

2 participants