Description
Adds a new Index Set Defaults section to the System > Configurations page where defaults for index set creation can be specified. This can also be configured by API. The new defaults apply to index creation everywhere in Graylog (currently Illuminate installations, and the System > Index Sets > Create Index set flow)
On the first server boot, the configuration values are initialized from the server.conf
values via the ElasticsearchConfiguration
class. This allows for both the index defaults configuration, and for system indices (Default, Events, and System Events index sets) to be created with the specified defaults.
The @Deprecated
annotation was also removed from the corresponding server configuration values, since we intend to continue using them as initialization defaults.
The following new defaults are also being used:
- Shards:
1
- Rotation Strategy:
Size: 30GB
Note that the config UI is hidden for Cloud environments.
The default graylog.conf
was also updated:
- Comment out default properties, so that the defaults specified in
ElasticsearchConfiguration
will take precedence for users who establish a new configuration file from the template.
- Re-order the properties for consistency.
- Formatting adjustments.
Closes https://github.com/Graylog2/graylog-plugin-enterprise/issues/3264 https://github.com/Graylog2/graylog-plugin-enterprise/issues/3319
/jenkins-pr-deps https://github.com/Graylog2/graylog-plugin-enterprise/pull/3803
Motivation and Context
The goal is to achieve globally-applicable Index set defaults, which apply uniformly throughout the application. Previously, hard-coded/arbitrary values were used on the Create Index Set page and new Illuminate index creation process. This change standardizes the initialization and use of central defaults.
Testing
- Verify that the new System > Configurations > Index Set Defaults are initialized with the correct defaults specified in the
server.conf
file. You might need to delete the configuration from Mongo to test multiple times (db.cluster_config.deleteOne({"type": /IndexSetsDefaultConfiguration/})
). Also verify that the values can be customized.
- Verify that the Default, Events, and System Events indices are also created with the correct defaults.
- Verify that the System > Index Sets > Create Index page uses the correct defaults. Verify the same for the Illuminate index set.
Index sets to tests:
- Default
- Events
- System Events
- Indexer Failures
- Restored Archives
How Has This Been Tested?
Testing will be done after the remaining tasks are finished.
Screenshots (if appropriate):
A new Index Sets Configuration section has been added:
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Refactoring (non-breaking change)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
- [x] My code follows the code style of this project.
- [x] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the CONTRIBUTING document.
- [ ] I have added tests to cover my changes.