Move total IPs in range from a state to a separate metric

This commit is contained in:
Bryan Boreham committed 2016-11-01 18:03:35 +00:00
1 parent cfff8ee8be
commit 86d68c9875
1 file changed
+6 -1
+6 -1
View File
@@ -63,10 +63,15 @@ var metrics []metric = []metric{
{desc("weave_ips", "Number of IP addresses.", "state"),
func(s WeaveStatus, desc *prometheus.Desc, ch chan<- prometheus.Metric) {
if s.IPAM != nil {
ch <- intGauge(desc, s.IPAM.RangeNumIPs, "total")
ch <- intGauge(desc, s.IPAM.ActiveIPs, "local-used")
}
}},
{desc("weave_max_ips", "Number of IP addresses used by allocator."),
func(s WeaveStatus, desc *prometheus.Desc, ch chan<- prometheus.Metric) {
if s.IPAM != nil {
ch <- intGauge(desc, s.IPAM.RangeNumIPs)
}
}},
{desc("weave_dns_entries", "Number of DNS entries.", "state"),
func(s WeaveStatus, desc *prometheus.Desc, ch chan<- prometheus.Metric) {
if s.DNS != nil {