Initial version of NUT exporter and command

This commit is contained in:
Dominik Honnef
2016-12-27 21:53:06 +01:00
commit 6f026006c0
2 changed files with 232 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
package main
import (
"net/http"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"honnef.co/go/nut_exporter"
)
func main() {
c := nut_exporter.NewNUTCollector([]string{"main"}, nil)
prometheus.MustRegister(c)
http.Handle("/metrics", promhttp.Handler())
http.ListenAndServe(":9999", nil)
}