NDrive / graylog-archiver

Archives graylog indices.
MIT License
13 stars 6 forks source link

Support multiple index sets in Graylog #8

Open hhamalai opened 6 years ago

hhamalai commented 6 years ago

Currently multiple index sets are not supported. The returned list of indices (by sort_indices) will contain all indices over different index sets resulting arbitrary indices being archived over all index sets present.

The pull request will change the behaviour so, that the indices are first grouped by index set name, and then sorted by the index number, after which all but max_indices of the newest indices are archived from each index set.

Also changed to use relative imports for easier testing and development.

hhamalai commented 6 years ago

fixes also #6 given that deflectors are not archieved

tivrobo commented 6 years ago

@hhamalai, just see your PR after write own https://github.com/NDrive/graylog-archiver/pull/9 :) Today I'm faced with problem because .kibana index on my ES, so my PR fixes extra indices and could be used to support multi index setup too.