Documentation ¶
Overview ¶
Package collector includes all individual collectors to gather and export system metrics.
Index ¶
- type Collector
- func NewCPUCollector(logger log.Logger) (Collector, error)
- func NewDiskstatsCollector(logger log.Logger) (Collector, error)
- func NewFilesystemCollector(logger log.Logger) (Collector, error)
- func NewLoadavgCollector(logger log.Logger) (Collector, error)
- func NewMeminfoCollector(logger log.Logger) (Collector, error)
- func NewNetDevCollector(logger log.Logger) (Collector, error)
- func NewNetStatCollector(logger log.Logger) (Collector, error)
- func NewSockStatCollector(logger log.Logger) (Collector, error)
- func NewStatCollector(logger log.Logger) (Collector, error)
- type NodeCollector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collector ¶
type Collector interface { // Get new metrics and expose them via prometheus registry. Update(ch chan<- prometheus.Metric) error }
Collector is the interface a collector has to implement.
func NewCPUCollector ¶
NewCPUCollector returns a new Collector exposing kernel/system statistics.
func NewDiskstatsCollector ¶
NewDiskstatsCollector returns a new Collector exposing disk device stats. Docs from https://www.kernel.org/doc/Documentation/iostats.txt
func NewFilesystemCollector ¶
NewFilesystemCollector returns a new Collector exposing filesystems stats.
func NewLoadavgCollector ¶
NewLoadavgCollector returns a new Collector exposing load average stats.
func NewMeminfoCollector ¶
NewMeminfoCollector returns a new Collector exposing memory stats.
func NewNetDevCollector ¶
NewNetDevCollector returns a new Collector exposing network device stats.
func NewNetStatCollector ¶
NewNetStatCollector takes and returns a new Collector exposing network stats.
func NewSockStatCollector ¶
NewSockStatCollector returns a new Collector exposing socket stats.
type NodeCollector ¶
type NodeCollector struct { Collectors map[string]Collector // contains filtered or unexported fields }
NodeCollector implements the prometheus.Collector interface.
func NewNodeCollector ¶
func NewNodeCollector(logger log.Logger, filters ...string) (*NodeCollector, error)
NewNodeCollector creates a new NodeCollector.
func (NodeCollector) Collect ¶
func (n NodeCollector) Collect(ch chan<- prometheus.Metric)
Collect implements the prometheus.Collector interface.
func (NodeCollector) Describe ¶
func (n NodeCollector) Describe(ch chan<- *prometheus.Desc)
Describe implements the prometheus.Collector interface.