-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Add ILM policy for new stack monitoring data streams #82498
Conversation
Pinging @elastic/es-data-management (Team:Data Management) |
relates to #81839 |
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.
Generally looks good, I left a couple of comments.
Can you also add a test for this similar to what we do for StackTemplateRegistryTests
? That way we can test the duration copying from the setting into the ILM policy and ensure it works correctly.
...k/plugin/core/src/main/java/org/elasticsearch/xpack/core/template/LifecyclePolicyConfig.java
Outdated
Show resolved
Hide resolved
x-pack/plugin/core/src/main/resources/monitoring-mb-ilm-policy.json
Outdated
Show resolved
Hide resolved
Co-authored-by: Lee Hinman <[email protected]>
@elasticmachine update branch |
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.
LGTM, I left two suuuper minor things
...toring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringTemplateRegistryTests.java
Outdated
Show resolved
Hide resolved
...toring/src/test/java/org/elasticsearch/xpack/monitoring/MonitoringTemplateRegistryTests.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Lee Hinman <[email protected]>
Co-authored-by: Lee Hinman <[email protected]>
Reviewing this made me notice we're going to need a monitoring-entsearch as well. Looks like the mapping isn't there atm anyway so we'll just have to remember to include ILM when we add it (probably as part of elastic/kibana#121975) |
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 gave this a try locally and LGTM
@elasticmachine update branch |
Adds a templated ILM policy with a 3 day or 50 gb rollover and a 3 day retention period by default. The retention period checks the value set in xpack.monitoring.history.duration and uses that for the retention period if it is present. Depending on which default it uses, the _meta field is updated with the reasoning for picking the default retention value. Co-authored-by: Lee Hinman <[email protected]> Co-authored-by: Elastic Machine <[email protected]> # Conflicts: # x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/template/LifecyclePolicyConfig.java # x-pack/plugin/ml/qa/native-multi-node-tests/src/javaRestTest/java/org/elasticsearch/xpack/ml/integration/MlNativeIntegTestCase.java
* Upgrade documentation for xpack.monitoring.history.duration * A few updates now that #82498 has been opened with a concrete policy. * Grammar fix * Update docs/reference/migration/migrate_8_0/cluster-node-setting-changes.asciidoc Co-authored-by: James Baiera <[email protected]> Co-authored-by: James Baiera <[email protected]>
…82295) * Upgrade documentation for xpack.monitoring.history.duration * A few updates now that elastic#82498 has been opened with a concrete policy. * Grammar fix * Update docs/reference/migration/migrate_8_0/cluster-node-setting-changes.asciidoc Co-authored-by: James Baiera <[email protected]> Co-authored-by: James Baiera <[email protected]>
…82920) * Upgrade documentation for xpack.monitoring.history.duration * A few updates now that #82498 has been opened with a concrete policy. * Grammar fix * Update docs/reference/migration/migrate_8_0/cluster-node-setting-changes.asciidoc Co-authored-by: James Baiera <[email protected]> Co-authored-by: James Baiera <[email protected]> Co-authored-by: James Baiera <[email protected]>
…82892) Adds a templated ILM policy with a 3 day or 50 gb rollover and a 3 day retention period by default. The retention period checks the value set in xpack.monitoring.history.duration and uses that for the retention period if it is present. Depending on which default it uses, the _meta field is updated with the reasoning for picking the default retention value. Co-authored-by: Lee Hinman <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
Adds a templated ILM policy with a 3 day or 50 gb rollover and a 3 day retention period by default. The retention period checks the value set in
xpack.monitoring.history.duration
and uses that for the retention period if it is present. Depending on which default it uses, the_meta
field is updated with the reasoning for picking the default retention value:The defaults
Setting
xpack.monitoring.history.duration
to the value4d
at start upAlso included is a small enhancement to allow for template variable replacement in ILM policy resource files.