Create ipsec collector (#51)

This commit is contained in:
Gábor Fási
2019-10-25 03:11:05 +02:00
committed by Steve Brunton
parent 0250e6c58e
commit c757fc7216
6 changed files with 126 additions and 1 deletions

View File

@@ -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))
}