2022-05-24 21:49:47 +08:00
|
|
|
//go:generate ../../../tools/readme_config_includer/generator
|
2016-06-08 16:13:22 +08:00
|
|
|
package cgroup
|
|
|
|
|
|
|
|
|
|
import (
|
2022-05-24 21:49:47 +08:00
|
|
|
_ "embed"
|
|
|
|
|
|
2016-06-08 16:13:22 +08:00
|
|
|
"github.com/influxdata/telegraf"
|
|
|
|
|
"github.com/influxdata/telegraf/plugins/inputs"
|
|
|
|
|
)
|
|
|
|
|
|
2022-05-24 21:49:47 +08:00
|
|
|
// DO NOT REMOVE THE NEXT TWO LINES! This is required to embedd the sampleConfig data.
|
|
|
|
|
//go:embed sample.conf
|
|
|
|
|
var sampleConfig string
|
|
|
|
|
|
2016-06-08 16:13:22 +08:00
|
|
|
type CGroup struct {
|
2016-06-23 16:11:44 +08:00
|
|
|
Paths []string `toml:"paths"`
|
2016-06-23 17:23:31 +08:00
|
|
|
Files []string `toml:"files"`
|
2016-06-08 16:13:22 +08:00
|
|
|
}
|
|
|
|
|
|
2022-05-24 21:49:47 +08:00
|
|
|
func (*CGroup) SampleConfig() string {
|
|
|
|
|
return sampleConfig
|
|
|
|
|
}
|
|
|
|
|
|
2016-06-08 16:13:22 +08:00
|
|
|
func init() {
|
|
|
|
|
inputs.Add("cgroup", func() telegraf.Input { return &CGroup{} })
|
|
|
|
|
}
|