-
Notifications
You must be signed in to change notification settings - Fork 181
"default_index": "logstash-*" will open too many shards #42
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
Comments
might be because when it queries for /logtrail/hosts it looks in all your indexes. i updated my server.js in the following way to get around this. in line 1 i have imported date format var dateformat = require('dateformat');
/**
* Takes a pattern of the form blah-* and converts it into a list of indexes with dates appended
*/
function toDatedIndexPattern(prefix, start, days, as) {
then within the /logtrail/hosts route i modified it so that i use
then the hostAggRequest in the same method instead of
var hostAggRequest = {
index: index,
...
i use
var hostAggRequest = {
index: indexes,
ignore_unavailable:true,
|
OK so i managed to get a rolling window working for that query as well. Additional modifications are required.
...
setupHostsList();
$scope.hideDatePicker();
var params = {
index: selected_index_config.es.default_index,
};
if ($scope.pickedDateTime)
params.seek = Date.create($scope.pickedDateTime).getTime();
...
And that should do it. it will look for indexes before and after the seek time for systems Note : you may wish to look at #86 as well as it adjusts the hosts lookup when you change indexes in the settings |
One last update. You will want to update the callWithRequest handler in this function as well to That way if the aggs does not return any data, your UI will still update to show no fields correctly |
@soulis-siluos any change to create a pull request with those changes, so that @sivasamyk can merge then? |
Fix error "[9] System error: not a directory"
has this feature been added? |
@pdiniz13, does not look like this is in the repo. Could you contribute via a pull request? |
Providing a PR as #428 on behalf of the changes of @soulis-siluos above. |
i have about 2 month of logs stored and opening logtrail it complains (actually ES is the one that complains) about too many shards
I can workaround by using
default_index": "logstash-2017.*
but this also means that i will have to put some cron limiting the index name to the current monthIs it possible to define something like
logstash-YYYY.MM.DD-*.
where the number of days to query is set by thedefault_time_range_in_days
The text was updated successfully, but these errors were encountered: