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,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentObject
public class SnapshotLifecycleStats
extends Object
implements Writeable, org.elasticsearch.xcontent.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
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.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 org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.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(org.elasticsearch.xcontent.XContentParser parser) removePolicy(String policyId) toString()org.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.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(org.elasticsearch.core.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
public static final org.elasticsearch.xcontent.ParseField RETENTION_RUNS -
RETENTION_FAILED
public static final org.elasticsearch.xcontent.ParseField RETENTION_FAILED -
RETENTION_TIMED_OUT
public static final org.elasticsearch.xcontent.ParseField RETENTION_TIMED_OUT -
RETENTION_TIME
public static final org.elasticsearch.xcontent.ParseField RETENTION_TIME -
RETENTION_TIME_MILLIS
public static final org.elasticsearch.xcontent.ParseField RETENTION_TIME_MILLIS -
POLICY_STATS
public static final org.elasticsearch.xcontent.ParseField POLICY_STATS -
TOTAL_TAKEN
public static final org.elasticsearch.xcontent.ParseField TOTAL_TAKEN -
TOTAL_FAILED
public static final org.elasticsearch.xcontent.ParseField TOTAL_FAILED -
TOTAL_DELETIONS
public static final org.elasticsearch.xcontent.ParseField TOTAL_DELETIONS -
TOTAL_DELETION_FAILURES
public static final org.elasticsearch.xcontent.ParseField 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 org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceorg.elasticsearch.xcontent.ToXContent- Throws:
IOException
-
hashCode
public int hashCode() -
equals
-
toString
-