Skip to content

Expose index age in ILM explain output #4142

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

Merged
merged 2 commits into from
Oct 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ public class LifecycleExplain
[DataMember(Name = "step_time_millis")]
[JsonFormatter(typeof(DateTimeOffsetEpochMillisecondsFormatter))]
public DateTimeOffset StepTime { get; internal set; }

/// <summary>
/// The age of the index, useful to gauge when the next phase will trigger based on <see cref="IPhase.MinimumAge"/>
/// </summary>
[DataMember(Name = "age")]
public Time Age { get; internal set; }
}

public class PhaseExecution
Expand Down
2 changes: 1 addition & 1 deletion src/Tests/Tests/XPack/Ilm/IlmApiTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ [I] public async Task IlmExplainLifecycleResponse() => await Assert<ExplainLifec

indexDict.Index.Should().Be("project");
indexDict.Managed.Should().Be(false);

indexDict.Age.Should().BeNull();
});

[I] public async Task IlmStopResponse() => await Assert<StopIlmResponse>(IlmStopStep, (v, r) =>
Expand Down