Browse Source

Add logging for ethtool device include/exclude and metrics include flags (#2979)

Signed-off-by: Sam Leiken <sam.k.leiken@gmail.com>
pull/3009/head
Sam Leiken 7 months ago committed by GitHub
parent
commit
9572e7a07b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 10
      collector/ethtool_linux.go

10
collector/ethtool_linux.go

@ -96,6 +96,16 @@ func makeEthtoolCollector(logger log.Logger) (*ethtoolCollector, error) {
return nil, fmt.Errorf("failed to initialize ethtool library: %w", err) return nil, fmt.Errorf("failed to initialize ethtool library: %w", err)
} }
if *ethtoolDeviceInclude != "" {
level.Info(logger).Log("msg", "Parsed flag --collector.ethtool.device-include", "flag", *ethtoolDeviceInclude)
}
if *ethtoolDeviceExclude != "" {
level.Info(logger).Log("msg", "Parsed flag --collector.ethtool.device-exclude", "flag", *ethtoolDeviceExclude)
}
if *ethtoolIncludedMetrics != "" {
level.Info(logger).Log("msg", "Parsed flag --collector.ethtool.metrics-include", "flag", *ethtoolIncludedMetrics)
}
// Pre-populate some common ethtool metrics. // Pre-populate some common ethtool metrics.
return &ethtoolCollector{ return &ethtoolCollector{
fs: fs, fs: fs,

Loading…
Cancel
Save