diff --git a/prog/weaver/metrics.go b/prog/weaver/metrics.go index 3ab4a4a9..9063f404 100644 --- a/prog/weaver/metrics.go +++ b/prog/weaver/metrics.go @@ -82,6 +82,18 @@ var metrics = []metric{ ch <- intGauge(desc, metrics.Flows) } }}, + {desc("weave_ipam_pending_allocates", "Number of pending allocates."), + func(s WeaveStatus, desc *prometheus.Desc, ch chan<- prometheus.Metric) { + if s.IPAM != nil { + ch <- intGauge(desc, len(s.IPAM.PendingAllocates)) + } + }}, + {desc("weave_ipam_pending_claims", "Number of pending claims."), + func(s WeaveStatus, desc *prometheus.Desc, ch chan<- prometheus.Metric) { + if s.IPAM != nil { + ch <- intGauge(desc, len(s.IPAM.PendingClaims)) + } + }}, } func fastDPMetrics(s WeaveStatus) *weave.FastDPMetrics { diff --git a/site/metrics.md b/site/metrics.md index 068eb953..56c57720 100644 --- a/site/metrics.md +++ b/site/metrics.md @@ -19,6 +19,8 @@ exposed: * `weave_max_ips` - Size of IP address space used by allocator. * `weave_dns_entries` - Number of DNS entries. * `weave_flows` - Number of FastDP flows. +* `weave_ipam_pending_allocates` - Number of pending allocates. +* `weave_ipam_pending_claims` - Number of pending claims. #### Publish Router Metrics Endpoint