Split native collector into it's component parts and make them enablable.

Last login is disabled by default as it's broken on ubuntu 12.04
Interrupts is disabled by default as it's very granular and we'll have total interrupts from /proc/stat

Allow ignoring devices from diskstats, ignore ram and loop devices by default.

Use glog for logging.
This commit is contained in:
Brian Brazil 2014-06-04 12:12:34 +01:00
commit 25ea90369c
14 changed files with 747 additions and 516 deletions

View file

@ -5,15 +5,12 @@ import (
"github.com/prometheus/client_golang/prometheus"
)
var Factories []func(Config, prometheus.Registry) (Collector, error)
var Factories = make(map[string]func(Config, prometheus.Registry) (Collector, error))
// Interface a collector has to implement.
type Collector interface {
// Get new metrics and expose them via prometheus registry.
Update() (n int, err error)
// Returns the name of the collector.
Name() string
}
type Config struct {