loadavg: Split the collector for linux and other platforms.
This commit is contained in:
parent
720198e047
commit
d80b2af492
3 changed files with 81 additions and 1 deletions
|
|
@ -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{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue