Merge pull request #2810 from ocadotechnology/add-pending-metrics

Add prometheus metrics for pending Allocates and Claims
This commit is contained in:
Martynas Pumputis authored and GitHub committed 2017-02-24 15:55:39 +00:00
commit 7a3e8e64b7
2 files changed
+14

No files matched your search

+12
View File
@@ -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 {
+2
View File
@@ -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