1 Star 0 Fork 0

zhangjungang/beats

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
config.go 1.04 KB
一键复制 编辑 原始数据 按行查看 历史
Noémi Ványi 提交于 2018-01-05 01:05 . New metric: CPU usage (#5545)
package process
import (
"github.com/elastic/beats/libbeat/common/cfgwarn"
"github.com/elastic/beats/libbeat/metric/system/process"
)
type Config struct {
Procs []string `config:"processes"`
Cgroups *bool `config:"process.cgroups.enabled"`
EnvWhitelist []string `config:"process.env.whitelist"`
CacheCmdLine bool `config:"process.cmdline.cache.enabled"`
IncludeTop process.IncludeTopConfig `config:"process.include_top_n"`
IncludeCPUTicks bool `config:"process.include_cpu_ticks"`
CPUTicks *bool `config:"cpu_ticks"` // Deprecated
}
func (c Config) Validate() error {
if c.CPUTicks != nil {
cfgwarn.Deprecate("6.1", "cpu_ticks is deprecated. Use process.include_cpu_ticks instead")
}
return nil
}
var defaultConfig = Config{
Procs: []string{".*"}, // collect all processes by default
CacheCmdLine: true,
IncludeTop: process.IncludeTopConfig{
Enabled: true,
ByCPU: 0,
ByMemory: 0,
},
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhangjungang/beats.git
git@gitee.com:zhangjungang/beats.git
zhangjungang
beats
beats
v6.2.2

搜索帮助