Skip to content

Commit

Permalink
Add logging for ethtool device include/exclude and metrics include fl…
Browse files Browse the repository at this point in the history
…ags (prometheus#2979)

Signed-off-by: Sam Leiken <sam.k.leiken@gmail.com>
  • Loading branch information
sleiken committed Apr 29, 2024
1 parent cadb1d1 commit 9572e7a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions collector/ethtool_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,16 @@ func makeEthtoolCollector(logger log.Logger) (*ethtoolCollector, error) {
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.
return &ethtoolCollector{
fs: fs,
Expand Down

0 comments on commit 9572e7a

Please sign in to comment.