File tree Expand file tree Collapse file tree 6 files changed +10
-16
lines changed
Expand file tree Collapse file tree 6 files changed +10
-16
lines changed Original file line number Diff line number Diff line change @@ -7,11 +7,11 @@ receivers:
77 {{- if .Receivers.HostMetrics.Scrapers }}
88 {{- if .Receivers.HostMetrics.Scrapers.CPU }}
99 cpu:
10- {{- if .Receivers.HostMetrics.Scrapers.CPU.Utilization }}
1110 metrics:
12- utilization:
11+ system.cpu.utilization :
12+ enabled: true
13+ system.cpu.logical.count :
1314 enabled: true
14- {{- end }}
1515 {{- end }}
1616 {{- if .Receivers.HostMetrics.Scrapers.Disk }}
1717 disk:
Original file line number Diff line number Diff line change @@ -79,9 +79,7 @@ func TestTemplateWrite(t *testing.T) {
7979 CollectionInterval : time .Minute ,
8080 InitialDelay : time .Second ,
8181 Scrapers : & config.HostMetricsScrapers {
82- CPU : & config.CPUScraper {
83- Utilization : true ,
84- },
82+ CPU : & config.CPUScraper {},
8583 Disk : & config.DiskScraper {},
8684 Filesystem : & config.FilesystemScraper {},
8785 Memory : & config.MemoryScraper {},
Original file line number Diff line number Diff line change @@ -242,9 +242,7 @@ type (
242242 Memory * MemoryScraper `yaml:"-" mapstructure:"memory"`
243243 Network * NetworkScraper `yaml:"-" mapstructure:"network"`
244244 }
245- CPUScraper struct {
246- Utilization bool `yaml:"-" mapstructure:"utilization"`
247- }
245+ CPUScraper struct {}
248246 DiskScraper struct {}
249247 FilesystemScraper struct {}
250248 MemoryScraper struct {}
Original file line number Diff line number Diff line change @@ -5,7 +5,9 @@ receivers:
55 scrapers :
66 cpu :
77 metrics :
8- utilization :
8+ system.cpu.utilization :
9+ enabled : true
10+ system.cpu.logical.count :
911 enabled : true
1012 disk :
1113 filesystem :
Original file line number Diff line number Diff line change @@ -38,9 +38,7 @@ collector:
3838 collection_interval: 1m0s
3939 initial_delay: 1s
4040 scrapers:
41- cpu:
42- metrics:
43- utilization:
41+ cpu: {}
4442 memory: {}
4543 disk: {}
4644 network: {}
Original file line number Diff line number Diff line change @@ -95,9 +95,7 @@ func AgentConfig() *config.Config {
9595 CollectionInterval : time .Minute ,
9696 InitialDelay : time .Second ,
9797 Scrapers : & config.HostMetricsScrapers {
98- CPU : & config.CPUScraper {
99- Utilization : true ,
100- },
98+ CPU : & config.CPUScraper {},
10199 Disk : & config.DiskScraper {},
102100 Filesystem : & config.FilesystemScraper {},
103101 Memory : & config.MemoryScraper {},
You can’t perform that action at this time.
0 commit comments