collector

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2020 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotImplemented collector type is not implemented on this os
	ErrNotImplemented = errors.New("not implemented on OS")

	// ErrAlreadyRunning collector is already running
	ErrAlreadyRunning = errors.New("already running")

	// ErrTTLNotExpired collector run ttl has not expired
	ErrTTLNotExpired = errors.New("TTL not expired")
)

Functions

This section is empty.

Types

type Collector

type Collector interface {
	Collect(context.Context) error
	Flush() cgm.Metrics
	ID() string
	Inventory() InventoryStats
	Logger() zerolog.Logger
}

Collector defines the interface for builtin metric collectors

type InventoryStats

type InventoryStats struct {
	ID              string `json:"name"`
	LastError       string `json:"last_error"`
	LastRunDuration string `json:"last_run_duration"`
	LastRunEnd      string `json:"last_run_end"`
	LastRunStart    string `json:"last_run_start"`
}

InventoryStats defines the stats a collector exposes for the /inventory endpoint

Directories

Path Synopsis
Package generic provides more cross-platform support for collecting basic system metrics
Package generic provides more cross-platform support for collecting basic system metrics
linux
procfs
Package procfs builtin linux-specific collector for /proc filesystem (replaces old nad shell plugins)
Package procfs builtin linux-specific collector for /proc filesystem (replaces old nad shell plugins)
windows
nvidia
Package nvidia collects GPU metrics using nvidia-smi.exe
Package nvidia collects GPU metrics using nvidia-smi.exe
wmi

Jump to

Keyboard shortcuts

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