collector

package
v0.0.0-...-1763908 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2015 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Exporter is a prometheus exporter using multiple Factories to collect and export system metrics.

Index

Constants

View Source
const Namespace = "node"

Variables

View Source
var Factories = make(map[string]func(Config) (Collector, error))

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) (err error)
}

Interface a collector has to implement.

func NewAttributesCollector

func NewAttributesCollector(config Config) (Collector, error)

Takes a config struct and prometheus registry and returns a new Collector exposing labels from the config.

func NewBondingCollector

func NewBondingCollector(config Config) (Collector, error)

NewBondingCollector returns a newly allocated bondingCollector. It exposes the number of configured and active slave of linux bonding interfaces.

func NewDiskstatsCollector

func NewDiskstatsCollector(config Config) (Collector, error)

Takes a config struct and prometheus registry and returns a new Collector exposing disk device stats.

func NewFilesystemCollector

func NewFilesystemCollector(config Config) (Collector, error)

Takes a config struct and prometheus registry and returns a new Collector exposing network device filesystems.

func NewGmondCollector

func NewGmondCollector(config Config) (Collector, error)

Takes a config struct and prometheus registry and returns a new Collector scraping ganglia.

func NewInterruptsCollector

func NewInterruptsCollector(config Config) (Collector, error)

Takes a config struct and prometheus registry and returns a new Collector exposing interrupts stats

func NewLastLoginCollector

func NewLastLoginCollector(config Config) (Collector, error)

Takes a config struct and prometheus registry and returns a new Collector exposing load, seconds since last login and a list of tags as specified by config.

func NewLoadavgCollector

func NewLoadavgCollector(config Config) (Collector, error)

Takes a config struct and prometheus registry and returns a new Collector exposing load, seconds since last login and a list of tags as specified by config.

func NewMegaCliCollector

func NewMegaCliCollector(config Config) (Collector, error)

Takes a config struct and prometheus registry and returns a new Collector exposing RAID status through megacli.

func NewMeminfoCollector

func NewMeminfoCollector(config Config) (Collector, error)

Takes a config struct and prometheus registry and returns a new Collector exposing memory stats.

func NewNetDevCollector

func NewNetDevCollector(config Config) (Collector, error)

Takes a config struct and prometheus registry and returns a new Collector exposing network device stats.

func NewNetStatCollector

func NewNetStatCollector(config Config) (Collector, error)

NewNetStatCollector takes a config struct and returns a new Collector exposing network stats.

func NewNtpCollector

func NewNtpCollector(config Config) (Collector, error)

Takes a config struct and prometheus registry and returns a new Collector exposing the offset between ntp and the current system time.

func NewRunitCollector

func NewRunitCollector(config Config) (Collector, error)

func NewStatCollector

func NewStatCollector(config Config) (Collector, error)

Takes a config struct and prometheus registry and returns a new Collector exposing network device stats.

func NewTextFileCollector

func NewTextFileCollector(config Config) (Collector, error)

Takes a config struct and registers a SetMetricFamilyInjectionHook.

func NewTimeCollector

func NewTimeCollector(config Config) (Collector, error)

Takes a config struct and prometheus registry and returns a new Collector exposing the current system time in seconds since epoch.

type Config

type Config struct {
	Config     map[string]string `json:"config"`
	Attributes map[string]string `json:"attributes"`
}

Directories

Path Synopsis
Types for unmarshalling gmond's XML output.
Types for unmarshalling gmond's XML output.

Jump to

Keyboard shortcuts

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