Skip to content

Commit

Permalink
Expose index age in ILM explain output
Browse files Browse the repository at this point in the history
  • Loading branch information
Mpdreamz committed Oct 14, 2019
1 parent 0ddb54f commit 7a30c91
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
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 guage 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

0 comments on commit 7a30c91

Please sign in to comment.