Documentation ¶
Overview ¶
Package generic provides more cross-platform support for collecting basic system metrics
Index ¶
- Constants
- func New() ([]collector.Collector, error)
- func NewCPUCollector(cfgBaseName string, parentLogger zerolog.Logger) (collector.Collector, error)
- func NewDiskCollector(cfgBaseName string, parentLogger zerolog.Logger) (collector.Collector, error)
- func NewFSCollector(cfgBaseName string, parentLogger zerolog.Logger) (collector.Collector, error)
- func NewLoadCollector(cfgBaseName string, parentLogger zerolog.Logger) (collector.Collector, error)
- func NewNetIFCollector(cfgBaseName string, parentLogger zerolog.Logger) (collector.Collector, error)
- func NewNetProtoCollector(cfgBaseName string, parentLogger zerolog.Logger) (collector.Collector, error)
- func NewVMCollector(cfgBaseName string, parentLogger zerolog.Logger) (collector.Collector, error)
- type CPU
- type Disk
- type DiskOptions
- type FS
- type IF
- type Load
- type Proto
- type VM
Constants ¶
const ( NamePrefix = "generic/" PackageName = "builtins.generic" NameCPU = "cpu" NameDisk = "disk" NameFS = "fs" NameLoad = "load" NameVM = "vm" NameIF = "if" NameProto = "proto" )
Variables ¶
This section is empty.
Functions ¶
func NewCPUCollector ¶
NewCPUCollector creates new psutils cpu collector
func NewDiskCollector ¶
NewDiskCollector creates new psutils disk collector
func NewFSCollector ¶
NewFSCollector creates new psutils disk collector
func NewLoadCollector ¶
NewLoadCollector creates new psutils collector
func NewNetIFCollector ¶
func NewNetIFCollector(cfgBaseName string, parentLogger zerolog.Logger) (collector.Collector, error)
NewNetIFCollector creates new psutils collector
Types ¶
type CPU ¶
type CPU struct {
// contains filtered or unexported fields
}
CPU metrics from psutils
func (*CPU) Inventory ¶
func (c *CPU) Inventory() collector.InventoryStats
Inventory returns collector stats for /inventory endpoint
type Disk ¶
type Disk struct {
// contains filtered or unexported fields
}
Disk metrics from the Linux ProcFS
func (*Disk) Inventory ¶
func (c *Disk) Inventory() collector.InventoryStats
Inventory returns collector stats for /inventory endpoint
type DiskOptions ¶
type DiskOptions struct { // common ID string `json:"id" toml:"id" yaml:"id"` RunTTL string `json:"run_ttl" toml:"run_ttl" yaml:"run_ttl"` // collector specific IODevices []string `json:"io_devices" toml:"io_devices" yaml:"io_devices"` }
DiskOptions defines what elements can be overridden in a config file
type FS ¶
type FS struct {
// contains filtered or unexported fields
}
FS metrics from the Linux ProcFS
func (*FS) Inventory ¶
func (c *FS) Inventory() collector.InventoryStats
Inventory returns collector stats for /inventory endpoint
type IF ¶
type IF struct {
// contains filtered or unexported fields
}
IF metrics
func (*IF) Inventory ¶
func (c *IF) Inventory() collector.InventoryStats
Inventory returns collector stats for /inventory endpoint
type Load ¶
type Load struct {
// contains filtered or unexported fields
}
Load metrics
func (*Load) Inventory ¶
func (c *Load) Inventory() collector.InventoryStats
Inventory returns collector stats for /inventory endpoint
type Proto ¶
type Proto struct {
// contains filtered or unexported fields
}
Proto metrics
func (*Proto) Inventory ¶
func (c *Proto) Inventory() collector.InventoryStats
Inventory returns collector stats for /inventory endpoint