Create ipsec collector (#51)
This commit is contained in:
committed by
Steve Brunton
parent
0250e6c58e
commit
c757fc7216
5
main.go
5
main.go
@@ -43,6 +43,7 @@ var (
|
||||
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")
|
||||
withIpsec = flag.Bool("with-ipsec", false, "retrieves ipsec metrics")
|
||||
|
||||
cfg *config.Config
|
||||
|
||||
@@ -208,6 +209,10 @@ func collectorOptions() []collector.Option {
|
||||
|
||||
}
|
||||
|
||||
if *withIpsec || cfg.Features.Ipsec {
|
||||
opts = append(opts, collector.WithIpsec())
|
||||
}
|
||||
|
||||
if *timeout != collector.DefaultTimeout {
|
||||
opts = append(opts, collector.WithTimeout(*timeout))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user