docs(inputs.cpu): Clarify 'time_active' contains 'iowait' (#14215)
This commit is contained in:
parent
42cd671963
commit
debae8ead0
|
|
@ -36,6 +36,7 @@ See the [CONFIGURATION.md][CONFIGURATION.md] for more details.
|
||||||
## If true, collect raw CPU time metrics
|
## If true, collect raw CPU time metrics
|
||||||
collect_cpu_time = false
|
collect_cpu_time = false
|
||||||
## If true, compute and report the sum of all non-idle CPU states
|
## If true, compute and report the sum of all non-idle CPU states
|
||||||
|
## NOTE: The resulting 'time_active' field INCLUDES 'iowait'!
|
||||||
report_active = false
|
report_active = false
|
||||||
## If true and the info is available then add core_id and physical_id tags
|
## If true and the info is available then add core_id and physical_id tags
|
||||||
core_tags = false
|
core_tags = false
|
||||||
|
|
|
||||||
|
|
@ -32,14 +32,6 @@ type CPUStats struct {
|
||||||
Log telegraf.Logger `toml:"-"`
|
Log telegraf.Logger `toml:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewCPUStats(ps system.PS) *CPUStats {
|
|
||||||
return &CPUStats{
|
|
||||||
ps: ps,
|
|
||||||
CollectCPUTime: true,
|
|
||||||
ReportActive: true,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (*CPUStats) SampleConfig() string {
|
func (*CPUStats) SampleConfig() string {
|
||||||
return sampleConfig
|
return sampleConfig
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,14 @@ import (
|
||||||
"github.com/influxdata/telegraf/testutil"
|
"github.com/influxdata/telegraf/testutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func NewCPUStats(ps system.PS) *CPUStats {
|
||||||
|
return &CPUStats{
|
||||||
|
ps: ps,
|
||||||
|
CollectCPUTime: true,
|
||||||
|
ReportActive: true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func TestCPUStats(t *testing.T) {
|
func TestCPUStats(t *testing.T) {
|
||||||
var mps system.MockPS
|
var mps system.MockPS
|
||||||
defer mps.AssertExpectations(t)
|
defer mps.AssertExpectations(t)
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
## If true, collect raw CPU time metrics
|
## If true, collect raw CPU time metrics
|
||||||
collect_cpu_time = false
|
collect_cpu_time = false
|
||||||
## If true, compute and report the sum of all non-idle CPU states
|
## If true, compute and report the sum of all non-idle CPU states
|
||||||
|
## NOTE: The resulting 'time_active' field INCLUDES 'iowait'!
|
||||||
report_active = false
|
report_active = false
|
||||||
## If true and the info is available then add core_id and physical_id tags
|
## If true and the info is available then add core_id and physical_id tags
|
||||||
core_tags = false
|
core_tags = false
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue