collectd

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: Apache-2.0 Imports: 14 Imported by: 6

Documentation

Index

Constants

View Source
const (
	ModuleName = "collectd"
)

Variables

This section is empty.

Functions

func InitHandler

func InitHandler(confraw *utils.ConfigRaw) (retconf utils.TypeInputConfig, err error)

InitHandler Init fileinput Handler.

Types

type CpuInfo

type CpuInfo struct {
	Info []cpu.InfoStat  `json:"info"`
	Time []cpu.TimesStat `json:"time"`
}

func CpuStat

func CpuStat() CpuInfo

type DiskInfo

type DiskInfo struct {
	Usage      *disk.UsageStat                `json:"usage"`
	Partition  []disk.PartitionStat           `json:"partition"`
	IOCounters map[string]disk.IOCountersStat `json:"iOCounters"`
}

func DiskStat

func DiskStat(dir string) DiskInfo

type HostInfo

type HostInfo struct {
	Info *host.InfoStat  `json:"info"`
	User []host.UserStat `json:"user"`
}

func HostStat

func HostStat() HostInfo

type InputConfig

type InputConfig struct {
	utils.InputConfig
	// contains filtered or unexported fields
}

InputConfig Define collectdinput' config.

func (*InputConfig) Start

func (t *InputConfig) Start()

Start Input's start,and this is the main function of input.

type MemoryInfo

type MemoryInfo struct {
	VirtualMemory *mem.VirtualMemoryStat `json:"virtualMemory"`
	SwapMemory    *mem.SwapMemoryStat    `json:"swapMemory"`
}

func MemStat

func MemStat() MemoryInfo

type NetInfo

type NetInfo struct {
	IOCounters    []net.IOCountersStat    `json:"iOCounters"`
	Connection    []net.ConnectionStat    `json:"connection"`
	ProtoCounters []net.ProtoCountersStat `json:"protoCounters"`
	Interface     []net.InterfaceStat     `json:"interface"`
	Filter        []net.FilterStat        `json:"filter"`
}

func NetStat

func NetStat() NetInfo

type ProcessInfo

type ProcessInfo struct {
	Name           string                      `json:"name"`
	Pid            int32                       `json:"pid"`
	Ppid           int32                       `json:"ppid"`
	Exe            string                      `json:"exe"`
	Cmdline        string                      `json:"cmdline"`
	CmdlineSlice   []string                    `json:"cmdlineSlice"`
	CreateTime     int64                       `json:"createTime"`
	Cwd            string                      `json:"cwd"`
	Parent         *process.Process            `json:"parent"`
	Status         []string                    `json:"status"`
	Uids           []int32                     `json:"uids"`
	Gids           []int32                     `json:"gids"`
	Terminal       string                      `json:"terminal"`
	Nice           int32                       `json:"nice"`
	IOnice         int32                       `json:"iOnice"`
	Rlimit         []process.RlimitStat        `json:"rlimit"`
	IOCounters     *process.IOCountersStat     `json:"iOCounters"`
	NumCtxSwitches *process.NumCtxSwitchesStat `json:"numCtxSwitches"`
	NumFDs         int32                       `json:"numFDs"`
	NumThreads     int32                       `json:"numThreads"`
	Threads        map[int32]*cpu.TimesStat    `json:"threads"`
	Times          *cpu.TimesStat              `json:"times"`
	CPUAffinity    []int32                     `json:"cpuAffinity"`
	MemoryInfo     *process.MemoryInfoStat     `json:"memoryInfo"`
	MemoryInfoEx   *process.MemoryInfoExStat   `json:"memoryInfoEx"`
	Children       []*process.Process          `json:"children"`
	OpenFiles      []process.OpenFilesStat     `json:"openFiles"`
	Connections    []net.ConnectionStat        `json:"connections"`
	NetIOCounters  []net.IOCountersStat        `json:"netIOCounters"`
	IsRunning      bool                        `json:"isRunning"`
	MemoryMaps     *[]process.MemoryMapsStat   `json:"memoryMaps"`
}

func ProcessStat

func ProcessStat() ProcessInfo

type SysInfo

type SysInfo struct {
	Host    HostInfo    `json:"host"`
	Cpu     CpuInfo     `json:"cpu"`
	Mem     MemoryInfo  `json:"mem"`
	Disk    DiskInfo    `json:"disk"`
	Net     NetInfo     `json:"net"`
	Process ProcessInfo `json:"process"`
}

func SystemInfo added in v0.3.1

func SystemInfo(dir string) SysInfo

Jump to

Keyboard shortcuts

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