PoE collector (#54)

Thanks for the PR.

* PoE collector
* Correcting mistake in comment for WithPOE function
This commit is contained in:
Welby McRoberts
2019-10-25 02:12:19 +01:00
committed by Steve Brunton
parent c757fc7216
commit 9fc2841a61
4 changed files with 135 additions and 0 deletions

View File

@@ -38,6 +38,7 @@ var (
withRoutes = flag.Bool("with-routes", false, "retrieves routing table information")
withDHCP = flag.Bool("with-dhcp", false, "retrieves DHCP server metrics")
withDHCPv6 = flag.Bool("with-dhcpv6", false, "retrieves DHCPv6 server metrics")
withPOE = flag.Bool("with-poe", false, "retrieves PoE metrics")
withPools = flag.Bool("with-pools", false, "retrieves IP(v6) pool metrics")
withOptics = flag.Bool("with-optics", false, "retrieves optical diagnostic metrics")
withWlanSTA = flag.Bool("with-wlansta", false, "retrieves connected wlan station metrics")
@@ -188,6 +189,10 @@ func collectorOptions() []collector.Option {
opts = append(opts, collector.WithDHCPv6())
}
if *withPOE || cfg.Features.POE {
opts = append(opts, collector.WithPOE())
}
if *withPools || cfg.Features.Pools {
opts = append(opts, collector.WithPools())
}