mirror of
https://github.com/rwinkhart/uni-nut.git
synced 2026-08-29 21:26:40 -04:00
18 lines
339 B
Go
18 lines
339 B
Go
package main
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"honnef.co/go/nut"
|
|
|
|
"github.com/prometheus/client_golang/prometheus"
|
|
"github.com/prometheus/client_golang/prometheus/promhttp"
|
|
)
|
|
|
|
func main() {
|
|
c := nut.NewCollector([]string{"localhost"})
|
|
prometheus.MustRegister(c)
|
|
http.Handle("/metrics", promhttp.Handler())
|
|
http.ListenAndServe(":9999", nil)
|
|
}
|