summaryrefslogtreecommitdiffstats
path: root/src/api/stats/prometheus.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/api/stats/prometheus.rs')
-rw-r--r--src/api/stats/prometheus.rs46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/api/stats/prometheus.rs b/src/api/stats/prometheus.rs
index 3709ea4..6fd37a0 100644
--- a/src/api/stats/prometheus.rs
+++ b/src/api/stats/prometheus.rs
@@ -257,6 +257,52 @@ pub(super) async fn render(state: &AppState, stats: &StatsResponse) -> String {
);
}
+ let remakes = &stats.remakes;
+ out.single(
+ "remakes_undecided",
+ "gauge",
+ "Remakes of the local epoch not decided yet (expired ones included).",
+ remakes.undecided as f64,
+ );
+ out.single(
+ "remakes_committed",
+ "gauge",
+ "Committed remakes of the local epoch: 1 while switching; more is a double commit.",
+ remakes.committed as f64,
+ );
+ out.single(
+ "rejoining",
+ "gauge",
+ "1 while syncing a newer epoch from scratch.",
+ flag(remakes.rejoining),
+ );
+ out.single(
+ "catch_up_attempts",
+ "gauge",
+ "Attempts at catching up with a newer epoch (0 when not catching up).",
+ remakes.catch_up_attempts as f64,
+ );
+ out.single(
+ "quarantined",
+ "gauge",
+ "Quarantined change sets (in memory only).",
+ remakes.quarantined as f64,
+ );
+ if let Some(secs) = remakes.oldest_quarantine_secs {
+ out.single(
+ "oldest_quarantine_seconds",
+ "gauge",
+ "Age of the oldest quarantined change set.",
+ secs as f64,
+ );
+ }
+ out.single(
+ "archived_epochs",
+ "gauge",
+ "Old epochs' documents kept in memory.",
+ remakes.archived_epochs as f64,
+ );
+
let topology = &stats.topology;
out.single(
"neighbours_target",