systemv2

package
v1.0.31 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

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) Collect

func (r *InputSystem) Collect(collector ilogtail.Collector) error

func (*InputSystem) CollectCPU

func (r *InputSystem) CollectCPU(collector ilogtail.Collector)

func (*InputSystem) CollectCore

func (r *InputSystem) CollectCore(collector ilogtail.Collector)

func (*InputSystem) CollectDisk

func (r *InputSystem) CollectDisk(collector ilogtail.Collector)

func (*InputSystem) CollectDiskUsage

func (r *InputSystem) CollectDiskUsage(collector ilogtail.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 ilogtail.Collector)

func (*InputSystem) CollectNet

func (r *InputSystem) CollectNet(collector ilogtail.Collector)

func (*InputSystem) CollectOpenFD

func (r *InputSystem) CollectOpenFD(collector ilogtail.Collector)

func (*InputSystem) CollectProtocol

func (r *InputSystem) CollectProtocol(collector ilogtail.Collector)

func (*InputSystem) CollectTCPStats

func (r *InputSystem) CollectTCPStats(collector ilogtail.Collector, stat *net.ProtoCountersStat)

func (*InputSystem) CommonInit

func (r *InputSystem) CommonInit(context ilogtail.Context) (int, error)

func (*InputSystem) Description

func (r *InputSystem) Description() string

func (*InputSystem) Init

func (r *InputSystem) Init(context ilogtail.Context) (int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL