From 508bd94ac91956662d83ca90c8bed1b7a437ef82 Mon Sep 17 00:00:00 2001 From: matt durham Date: Thu, 28 Sep 2023 09:26:52 -0400 Subject: [PATCH] Merge config changes --- collector/cpu_linux.go | 7 ------- collector/loadavg.go | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/collector/cpu_linux.go b/collector/cpu_linux.go index 7d4ea46a4f..c24c0a062c 100644 --- a/collector/cpu_linux.go +++ b/collector/cpu_linux.go @@ -62,13 +62,6 @@ var ( jumpBackDebugMessage = fmt.Sprintf("CPU Idle counter jumped backwards more than %f seconds, possible hotplug event, resetting CPU stats", jumpBackSeconds) ) -type CPUConfig struct { - EnableCPUGuest *bool - EnableCPUInfo *bool - FlagsInclude *string - BugsInclude *string -} - func init() { registerCollector("cpu", defaultEnabled, NewCPUCollector) } diff --git a/collector/loadavg.go b/collector/loadavg.go index 62e3f5c421..086886c474 100644 --- a/collector/loadavg.go +++ b/collector/loadavg.go @@ -49,7 +49,7 @@ func NewLoadavgCollector(config *NodeCollectorConfig, logger log.Logger) (Collec } func (c *loadavgCollector) Update(ch chan<- prometheus.Metric) error { - loads, err := getLoad() + loads, err := getLoad(c.config) if err != nil { return fmt.Errorf("couldn't get load: %w", err) }