systemv2

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 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 pipeline.Collector) error

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

func (*InputSystem) Init

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

Jump to

Keyboard shortcuts

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