procfs

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: BSD-3-Clause Imports: 23 Imported by: 0

Documentation

Overview

Package procfs builtin linux-specific collector for /proc filesystem (replaces old nad shell plugins)

Index

Constants

View Source
const (
	CollectorPrefix  = "procfs/"
	PackageName      = "builtins.linux.procfs"
	NameCPU          = "cpu"
	NameDisk         = "disk"
	NameNetInterface = "if"
	NameNetProto     = "proto"
	NameNetSocket    = "socket"
	NameLoad         = "load"
	NameVM           = "vm"
)

Variables

This section is empty.

Functions

func New

func New(ctx context.Context) ([]collector.Collector, error)

New creates new ProcFS collector

func NewCPUCollector

func NewCPUCollector(cfgBaseName, procFSPath string) (collector.Collector, error)

NewCPUCollector creates new procfs cpu collector

func NewDiskCollector added in v1.0.0

func NewDiskCollector(cfgBaseName, procFSPath string) (collector.Collector, error)

NewDiskCollector creates new procfs disk collector

func NewLoadCollector added in v1.0.0

func NewLoadCollector(cfgBaseName, procFSPath string) (collector.Collector, error)

NewLoadCollector creates new procfs load collector

func NewNetIFCollector added in v1.0.0

func NewNetIFCollector(cfgBaseName, procFSPath string) (collector.Collector, error)

NewNetIFCollector creates new procfs if collector

func NewNetProtoCollector added in v1.0.0

func NewNetProtoCollector(cfgBaseName, procFSPath string) (collector.Collector, error)

NewNetProtoCollector creates new procfs network protocol collector

func NewNetSocketCollector added in v1.0.0

func NewNetSocketCollector(cfgBaseName, procFSPath string) (collector.Collector, error)

NewNetSocketCollector creates new procfs if collector

func NewVMCollector added in v0.8.0

func NewVMCollector(cfgBaseName, procFSPath string) (collector.Collector, error)

NewVMCollector creates new procfs vm collector

Types

type CPU

type CPU struct {
	// contains filtered or unexported fields
}

CPU metrics from the Linux ProcFS

func (*CPU) Collect

func (c *CPU) Collect(ctx context.Context) error

Collect metrics from the procfs resource

func (*CPU) Flush

func (c *CPU) Flush() cgm.Metrics

Flush returns last metrics collected

func (*CPU) ID

func (c *CPU) ID() string

ID returns the id of the instance

func (*CPU) Inventory

func (c *CPU) Inventory() collector.InventoryStats

Inventory returns collector stats for /inventory endpoint

func (*CPU) Logger added in v0.19.1

func (c *CPU) Logger() zerolog.Logger

Logger returns collector's instance of logger

type Disk added in v1.0.0

type Disk struct {
	// contains filtered or unexported fields
}

Disk metrics from the Linux ProcFS

func (*Disk) Collect added in v1.0.0

func (c *Disk) Collect(ctx context.Context) error

Collect metrics from the procfs resource

func (*Disk) Flush added in v1.0.0

func (c *Disk) Flush() cgm.Metrics

Flush returns last metrics collected

func (*Disk) ID added in v1.0.0

func (c *Disk) ID() string

ID returns the id of the instance

func (*Disk) Inventory added in v1.0.0

func (c *Disk) Inventory() collector.InventoryStats

Inventory returns collector stats for /inventory endpoint

func (*Disk) Logger added in v1.0.0

func (c *Disk) Logger() zerolog.Logger

Logger returns collector's instance of logger

type Load added in v1.0.0

type Load struct {
	// contains filtered or unexported fields
}

Load metrics from the Linux ProcFS (actually from unix.Sysinfo call)

func (*Load) Collect added in v1.0.0

func (c *Load) Collect(ctx context.Context) error

Collect metrics from the procfs resource

func (*Load) Flush added in v1.0.0

func (c *Load) Flush() cgm.Metrics

Flush returns last metrics collected

func (*Load) ID added in v1.0.0

func (c *Load) ID() string

ID returns the id of the instance

func (*Load) Inventory added in v1.0.0

func (c *Load) Inventory() collector.InventoryStats

Inventory returns collector stats for /inventory endpoint

func (*Load) Logger added in v1.0.0

func (c *Load) Logger() zerolog.Logger

Logger returns collector's instance of logger

type NetIF added in v1.0.0

type NetIF struct {
	// contains filtered or unexported fields
}

NetIF metrics from the Linux ProcFS

func (*NetIF) Collect added in v1.0.0

func (c *NetIF) Collect(ctx context.Context) error

Collect metrics from the procfs resource

func (*NetIF) Flush added in v1.0.0

func (c *NetIF) Flush() cgm.Metrics

Flush returns last metrics collected

func (*NetIF) ID added in v1.0.0

func (c *NetIF) ID() string

ID returns the id of the instance

func (*NetIF) Inventory added in v1.0.0

func (c *NetIF) Inventory() collector.InventoryStats

Inventory returns collector stats for /inventory endpoint

func (*NetIF) Logger added in v1.0.0

func (c *NetIF) Logger() zerolog.Logger

Logger returns collector's instance of logger

type NetProto added in v1.0.0

type NetProto struct {
	// contains filtered or unexported fields
}

NetProto metrics from the Linux ProcFS

func (*NetProto) Collect added in v1.0.0

func (c *NetProto) Collect(ctx context.Context) error

Collect metrics from the procfs resource

func (*NetProto) Flush added in v1.0.0

func (c *NetProto) Flush() cgm.Metrics

Flush returns last metrics collected

func (*NetProto) ID added in v1.0.0

func (c *NetProto) ID() string

ID returns the id of the instance

func (*NetProto) Inventory added in v1.0.0

func (c *NetProto) Inventory() collector.InventoryStats

Inventory returns collector stats for /inventory endpoint

func (*NetProto) Logger added in v1.0.0

func (c *NetProto) Logger() zerolog.Logger

Logger returns collector's instance of logger

type NetSocket added in v1.0.0

type NetSocket struct {
	// contains filtered or unexported fields
}

NetSocket metrics from the Linux ProcFS

func (*NetSocket) Collect added in v1.0.0

func (c *NetSocket) Collect(ctx context.Context) error

Collect metrics from the procfs resource

func (*NetSocket) Flush added in v1.0.0

func (c *NetSocket) Flush() cgm.Metrics

Flush returns last metrics collected

func (*NetSocket) ID added in v1.0.0

func (c *NetSocket) ID() string

ID returns the id of the instance

func (*NetSocket) Inventory added in v1.0.0

func (c *NetSocket) Inventory() collector.InventoryStats

Inventory returns collector stats for /inventory endpoint

func (*NetSocket) Logger added in v1.0.0

func (c *NetSocket) Logger() zerolog.Logger

Logger returns collector's instance of logger

type VM added in v0.8.0

type VM struct {
	// contains filtered or unexported fields
}

VM metrics from the Linux ProcFS

func (*VM) Collect added in v0.8.0

func (c *VM) Collect(ctx context.Context) error

Collect metrics from the procfs resource

func (*VM) Flush added in v0.8.0

func (c *VM) Flush() cgm.Metrics

Flush returns last metrics collected

func (*VM) ID added in v0.8.0

func (c *VM) ID() string

ID returns the id of the instance

func (*VM) Inventory added in v0.8.0

func (c *VM) Inventory() collector.InventoryStats

Inventory returns collector stats for /inventory endpoint

func (*VM) Logger added in v0.19.1

func (c *VM) Logger() zerolog.Logger

Logger returns collector's instance of logger

Jump to

Keyboard shortcuts

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