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>
Signed-off-by: Vitaly Zhuravlev <v-zhuravlev@users.noreply.github.com>
  • Loading branch information
sleiken authored and v-zhuravlev committed Nov 1, 2024
1 parent 9fd241e commit 0149a33
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 0149a33

Please sign in to comment.