mirror of
https://github.com/rwinkhart/uni-nut.git
synced 2026-09-06 00:47:14 -04:00
Display error of ListenAndServe
This commit is contained in:
@@ -4,6 +4,7 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
@@ -21,5 +22,5 @@ func main() {
|
|||||||
c := nutcollector.New(strings.Fields(*fHosts))
|
c := nutcollector.New(strings.Fields(*fHosts))
|
||||||
prometheus.MustRegister(c)
|
prometheus.MustRegister(c)
|
||||||
http.Handle("/metrics", promhttp.Handler())
|
http.Handle("/metrics", promhttp.Handler())
|
||||||
http.ListenAndServe(*fListen, nil)
|
log.Fatal(http.ListenAndServe(*fListen, nil))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user