Move total IPs in range from a state to a separate metric
This commit is contained in:
1 parent
cfff8ee8be
commit
86d68c9875
1 file changed
+6
-1
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user