Exporter for machine metrics
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
532 B

package main
import (
"flag"
"log"
"github.com/prometheus/node_exporter/exporter"
)
var (
configFile = flag.String("config", "node_exporter.conf", "config file.")
memprofile = flag.String("memprofile", "", "write memory profile to this file")
)
func main() {
flag.Parse()
exporter, err := exporter.New(*configFile)
if err != nil {
log.Fatalf("Couldn't instantiate exporter: %s", err)
}
log.Printf("Registered collectors:")
for _, c := range exporter.Collectors {
log.Print(" - ", c.Name())
}
exporter.Loop()
}