Package org.elasticsearch.xpack.core.slm
ilmilm module's org.elasticsearch.xpack.slm package.
Contained within this specific package are the custom metadata objects and models used through out the SLM service. The names can be confusing, so it's important to know the differences between each metadata object.
The SnapshotLifecyclePolicy object is the user provided definition of the
SLM policy. This is what a user provides when creating a snapshot policy, and acts as the blueprint for the create snapshot request
that the service launches. It additionally surfaces the next point in time a policy should be executed.
Lateral to the policy, the SnapshotInvocationRecord represents an execution
of a policy. It includes within it the policy name and details about its execution, success or failure.
Next is the SnapshotLifecyclePolicyMetadata object, which not only contains
the SnapshotLifecyclePolicy blueprint, but also any contextual information about
that policy, like the user information of who created it so that it may be used during execution, as well as the version of the policy,
and both the last failed and successful runs as SnapshotInvocationRecords. This
is the living representation of a policy within the cluster state.
When a "Get Policy" action is executed, the SnapshotLifecyclePolicyItem is
returned instead. This is a thin wrapper around the internal
SnapshotLifecyclePolicyMetadata object so that we do not expose any sensitive
internal headers or user information in the Get API.
Finally, the SnapshotLifecycleMetadata class contains all living SLM
policies and their metadata, acting as the SLM specific root object within the cluster state.
-
ClassesClassDescriptionHolds information about Snapshots kicked off by Snapshot Lifecycle Management in the cluster state, so that this information can be presented to the user.Custom cluster state metadata that stores all the snapshot lifecycle policies and their associated metadataA
SnapshotLifecyclePolicyis a policy for the cluster including a schedule of when a snapshot should be triggered, what the snapshot should be named, what repository it should go to, and the configuration for the snapshot itself.TheSnapshotLifecyclePolicyItemclass is a special wrapper almost exactly like theSnapshotLifecyclePolicyMetadata, however, it elides the headers to ensure that they are not leaked to the user since they may contain sensitive information.SnapshotLifecyclePolicyMetadataencapsulates aSnapshotLifecyclePolicyas well as the additional meta information link headers used for execution, version (a monotonically incrementing number), and last modified dateSnapshotLifecycleStats contains metrics and stats about snapshot lifecycle policy execution - how many snapshots were taken, deleted, how many failures, etc.