w60g Interface collector (#63)

Allow the collection of w60g interface statistics.
This commit is contained in:
Welby McRoberts
2019-12-26 18:20:24 +00:00
committed by Steve Brunton
parent 55ae663ce3
commit 5cea9840a7
4 changed files with 159 additions and 0 deletions

View File

@@ -43,6 +43,7 @@ var (
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")
withW60G = flag.Bool("with-w60g", false, "retrieves w60g interface metrics")
withWlanSTA = flag.Bool("with-wlansta", false, "retrieves connected wlan station metrics")
withWlanIF = flag.Bool("with-wlanif", false, "retrieves wlan interface metrics")
withMonitor = flag.Bool("with-monitor", false, "retrieves ethernet interface monitor info")
@@ -204,6 +205,10 @@ func collectorOptions() []collector.Option {
opts = append(opts, collector.WithOptics())
}
if *withW60G || cfg.Features.W60G {
opts = append(opts, collector.WithW60G())
}
if *withWlanSTA || cfg.Features.WlanSTA {
opts = append(opts, collector.WithWlanSTA())
}