mirror of
https://github.com/rwinkhart/uni-nut.git
synced 2026-08-29 13:16:37 -04:00
Initial version of NUT exporter and command
This commit is contained in:
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user