Skip to content

Commit 65f64ce

Browse files
codebrainrusscam
authored andcommitted
Add time since last auto follow fetch to auto follow stats (#3727)
Add time since last auto follow fetch to auto follow stats (#3727)
1 parent 061e80a commit 65f64ce

File tree

1 file changed

+35
-9
lines changed

1 file changed

+35
-9
lines changed

src/Nest/XPack/CrossClusterReplication/Stats/CcrStatsResponse.cs

Lines changed: 35 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Collections.Generic;
1+
using System;
2+
using System.Collections.Generic;
23
using Elasticsearch.Net;
34
using Newtonsoft.Json;
45

@@ -22,7 +23,6 @@ public class CcrStatsResponse : ResponseBase, ICcrStatsResponse
2223
public CcrFollowStats FollowStats { get; internal set; }
2324
}
2425

25-
2626
public class CcrFollowStats
2727
{
2828
/// <inheritdoc cref="IFollowIndexStatsResponse.Indices" />
@@ -32,28 +32,54 @@ public class CcrFollowStats
3232

3333
public class CcrAutoFollowStats
3434
{
35-
3635
/// <summary>
37-
/// the number of indices that the auto-follow coordinator failed to automatically follow; the causes of recent failures are
38-
/// captured in the logs of the elected master node, and in the auto_follow_stats.recent_auto_follow_errors field
36+
/// The number of indices that the auto-follow coordinator failed to automatically follow; the causes of recent failures are
37+
/// captured in the logs of the elected master node, and in the <see cref="RecentAutoFollowErrors"/> field.
3938
/// </summary>
4039
[JsonProperty("number_of_failed_follow_indices")]
4140
public long NumberOfFailedFollowIndices { get; internal set; }
4241

4342
/// <summary>
44-
/// the number of times that the auto-follow coordinator failed to retrieve the cluster state from a
45-
/// remote cluster registered in a collection of auto-follow patterns
43+
/// The number of times that the auto-follow coordinator failed to retrieve the cluster state from a
44+
/// remote cluster registered in a collection of auto-follow patterns.
4645
/// </summary>
4746
[JsonProperty("number_of_failed_remote_cluster_state_requests")]
4847
public long NumberOfFailedRemoteClusterStateRequests { get; internal set; }
4948

50-
/// <summary> the number of indices that the auto-follow coordinator successfully followed </summary>
49+
/// <summary>The number of indices that the auto-follow coordinator successfully followed.</summary>
5150
[JsonProperty("number_of_successful_follow_indices")]
5251
public long NumberOfSuccessfulFollowIndices { get; internal set; }
5352

54-
/// <summary> an array of objects representing failures by the auto-follow coordinator </summary>
53+
/// <summary>An array of objects representing failures by the auto-follow coordinator.</summary>
5554
[JsonProperty("recent_auto_follow_errors")]
5655
public IReadOnlyCollection<ErrorCause> RecentAutoFollowErrors { get; internal set; } = EmptyReadOnly<ErrorCause>.Collection;
5756

57+
/// <summary>
58+
/// An array of auto followed clusters.
59+
/// </summary>
60+
[JsonProperty("auto_followed_clusters")]
61+
public IReadOnlyCollection< AutoFollowedCluster> AutoFollowedClusters { get; internal set; } = EmptyReadOnly<AutoFollowedCluster>.Collection;
62+
}
63+
64+
public class AutoFollowedCluster
65+
{
66+
/// <summary>
67+
/// The cluster name.
68+
/// </summary>
69+
[JsonProperty("cluster_name")]
70+
public string ClusterName { get; internal set; }
71+
72+
/// <summary>
73+
/// Time since last check.
74+
/// </summary>
75+
[JsonProperty("time_since_last_check_millis")]
76+
[JsonConverter(typeof(EpochMillisecondsDateTimeJsonConverter))]
77+
public DateTimeOffset TimeSinceLastCheck { get; internal set; }
78+
79+
/// <summary>
80+
/// Last seen metadata version.
81+
/// </summary>
82+
[JsonProperty("last_seen_metadata_version")]
83+
public long LastSeenMetadataVersion { get; internal set; }
5884
}
5985
}

0 commit comments

Comments
 (0)