loadavg: Split the collector for linux and other platforms.

This commit is contained in:
Siavash Safi 2015-06-24 16:38:43 +04:30
commit d80b2af492
3 changed files with 81 additions and 1 deletions

View file

@ -1,4 +1,4 @@
// +build !noloadavg
// +build !linux !noloadavg
package collector
@ -21,6 +21,7 @@ func init() {
Factories["loadavg"] = NewLoadavgCollector
}
// Takes a prometheus registry and returns a new Collector exposing
// load1 stat.
func NewLoadavgCollector() (Collector, error) {
return &loadavgCollector{