Watch
0
0
Fork
You've already forked hyperhive
0

export bao client-cert not_before/not_after gauges and alert past 80% of lifetime

This commit is contained in:
atlas 2026-10-25 17:41:47 +01:00 • committed by mara
commit 078696aaee
23 changed files with 604 additions and 53 deletions

View file

@ -62,6 +62,8 @@ swarm-queue-client = { workspace = true, features = [
"agent-permissions",
"agent-archetype",
] }
# The `bao.client_cert.*` gauges on this exporter.
swarm-cert-metrics.workspace = true
swarm-matrix-client.workspace = true
swarm-secret-client.workspace = true
swarm-wire.workspace = true

View file

@ -261,6 +261,9 @@ fn register_instruments(provider: &SdkMeterProvider, snapshot: Arc<Mutex<Vec<Con
/// instruments use would move that window rather than close it, and exists
/// only because `gather()` is async — which `readiness()` is not.
fn register_hive_instruments(meter: &opentelemetry::metrics::Meter) {
// The hive's own store certificate (`client.pem`, `BAO_CLIENT_CERT`).
swarm_cert_metrics::register(meter, "client");
// Seconds since the exporter started. A hive that is up reports this every
// interval whether or not it hosts a single agent, which is what makes
// "no agents" distinguishable from "not reporting"; a restart reads as a