Documentation
¶
Index ¶
- type InputSystem
- func (r *InputSystem) Collect(collector pipeline.Collector) error
- func (r *InputSystem) CollectCPU(collector pipeline.Collector)
- func (r *InputSystem) CollectCore(collector pipeline.Collector)
- func (r *InputSystem) CollectDisk(collector pipeline.Collector)
- func (r *InputSystem) CollectDiskUsage(collector pipeline.Collector)
- func (r *InputSystem) CollectMem(collector pipeline.Collector)
- func (r *InputSystem) CollectNet(collector pipeline.Collector)
- func (r *InputSystem) CollectOpenFD(collector pipeline.Collector)
- func (r *InputSystem) CollectProtocol(collector pipeline.Collector)
- func (r *InputSystem) CollectTCPStats(collector pipeline.Collector, stat *net.ProtoCountersStat)
- func (r *InputSystem) CommonInit(context pipeline.Context) (int, error)
- func (r *InputSystem) Description() string
- func (r *InputSystem) Init(context pipeline.Context) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InputSystem ¶
type InputSystem struct {
Core bool
CPU bool
Mem bool
Disk bool
Net bool
Protocol bool
TCP bool
OpenFd bool
CPUPercent bool
Disks []string
NetInterfaces []string
Labels map[string]string
ExcludeDiskFsType string
ExcludeDiskPath string
// contains filtered or unexported fields
}
InputSystem plugin is modified with care, because two collect libs are used, which are procfs and gopsutil. They are works well on the host machine. But on the linux virtual environment, they are different. The procfs or read proc file system should mount the `logtail_host` path, more details please see `helper.mount_others.go`. The gopsutil lib only support mount path with ENV config, more details please see `github.com/shirou/gopsutil/internal/common/common.go`.
func (*InputSystem) CollectCPU ¶
func (r *InputSystem) CollectCPU(collector pipeline.Collector)
func (*InputSystem) CollectCore ¶
func (r *InputSystem) CollectCore(collector pipeline.Collector)
func (*InputSystem) CollectDisk ¶
func (r *InputSystem) CollectDisk(collector pipeline.Collector)
func (*InputSystem) CollectDiskUsage ¶
func (r *InputSystem) CollectDiskUsage(collector pipeline.Collector)
CollectDiskUsage use `/proc/1/mounts` to find the device rather than `proc/self/mounts` because one device would be mounted many times in virtual environment.
func (*InputSystem) CollectMem ¶
func (r *InputSystem) CollectMem(collector pipeline.Collector)
func (*InputSystem) CollectNet ¶
func (r *InputSystem) CollectNet(collector pipeline.Collector)
func (*InputSystem) CollectOpenFD ¶
func (r *InputSystem) CollectOpenFD(collector pipeline.Collector)
func (*InputSystem) CollectProtocol ¶
func (r *InputSystem) CollectProtocol(collector pipeline.Collector)
func (*InputSystem) CollectTCPStats ¶
func (r *InputSystem) CollectTCPStats(collector pipeline.Collector, stat *net.ProtoCountersStat)
func (*InputSystem) CommonInit ¶
func (r *InputSystem) CommonInit(context pipeline.Context) (int, error)
func (*InputSystem) Description ¶
func (r *InputSystem) Description() string