Module org.elasticsearch.xcore
Package org.elasticsearch.xpack.core.slm
Class SnapshotLifecycleStats
java.lang.Object
org.elasticsearch.xpack.core.slm.SnapshotLifecycleStats
- All Implemented Interfaces:
Writeable,ToXContent,ToXContentObject
SnapshotLifecycleStats contains metrics and stats about snapshot lifecycle policy execution - how
many snapshots were taken, deleted, how many failures, etc. It contains both global stats
(snapshots taken, retention runs), and per-policy stats.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionSnapshotLifecycleStats(long retentionRuns, long retentionFailed, long retentionTimedOut, long retentionTimeMs, Map<String, SnapshotLifecycleStats.SnapshotPolicyStats> policyStats) -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()merge(SnapshotLifecycleStats other) static SnapshotLifecycleStatsparse(XContentParser parser) removePolicy(String policyId) toString()toXContent(XContentBuilder builder, ToXContent.Params params) withDeletedIncremented(String slmPolicy) Return new stats with the per-policy snapshot deleted count for the given policy id incrementedwithDeleteFailureIncremented(String slmPolicy) Return new stats with the per-policy snapshot deletion failure count for the given policy id incrementedwithDeletionTimeUpdated(TimeValue elapsedTime) Return new stats with the amount of time taken for deleting snapshots during SLM retention updatedwithFailedIncremented(String slmPolicy) Return new stats with the per-policy snapshot failure count for the given policy id incrementedReturn new stats with number of times SLM retention has failed incrementedReturn new stats with number of times SLM retention has been run incrementedReturn new stats the number of times that SLM retention timed out due to the max delete time window being exceeded incrementedwithTakenIncremented(String slmPolicy) Return new stats with the per-policy snapshot taken count for the given policy id incrementedvoidwriteTo(StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
RETENTION_RUNS
-
RETENTION_FAILED
-
RETENTION_TIMED_OUT
-
RETENTION_TIME
-
RETENTION_TIME_MILLIS
-
POLICY_STATS
-
TOTAL_TAKEN
-
TOTAL_FAILED
-
TOTAL_DELETIONS
-
TOTAL_DELETION_FAILURES
-
-
Constructor Details
-
SnapshotLifecycleStats
public SnapshotLifecycleStats() -
SnapshotLifecycleStats
public SnapshotLifecycleStats(long retentionRuns, long retentionFailed, long retentionTimedOut, long retentionTimeMs, Map<String, SnapshotLifecycleStats.SnapshotPolicyStats> policyStats) -
SnapshotLifecycleStats
- Throws:
IOException
-
-
Method Details
-
parse
-
merge
-
removePolicy
-
getMetrics
- Returns:
- a map of per-policy stats for each SLM policy
-
withRetentionRunIncremented
Return new stats with number of times SLM retention has been run incremented -
withRetentionFailedIncremented
Return new stats with number of times SLM retention has failed incremented -
withRetentionTimedOutIncremented
Return new stats the number of times that SLM retention timed out due to the max delete time window being exceeded incremented -
withDeletionTimeUpdated
Return new stats with the amount of time taken for deleting snapshots during SLM retention updated -
withTakenIncremented
Return new stats with the per-policy snapshot taken count for the given policy id incremented -
withFailedIncremented
Return new stats with the per-policy snapshot failure count for the given policy id incremented -
withDeletedIncremented
Return new stats with the per-policy snapshot deleted count for the given policy id incremented -
withDeleteFailureIncremented
Return new stats with the per-policy snapshot deletion failure count for the given policy id incremented -
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
hashCode
public int hashCode() -
equals
-
toString
-