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:
parent
964cdbfcc9
commit
25ea90369c
14 changed files with 747 additions and 516 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue