From 5b449e859f5bd64046daf6f6c494d7e87a874e74 Mon Sep 17 00:00:00 2001 From: Dominik Honnef Date: Thu, 29 Dec 2016 17:26:36 +0100 Subject: [PATCH] Display error of ListenAndServe --- cmd/nut_exporter/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/nut_exporter/main.go b/cmd/nut_exporter/main.go index 35183d1..8480e3d 100644 --- a/cmd/nut_exporter/main.go +++ b/cmd/nut_exporter/main.go @@ -4,6 +4,7 @@ package main import ( "flag" + "log" "net/http" "strings" @@ -21,5 +22,5 @@ func main() { c := nutcollector.New(strings.Fields(*fHosts)) prometheus.MustRegister(c) http.Handle("/metrics", promhttp.Handler()) - http.ListenAndServe(*fListen, nil) + log.Fatal(http.ListenAndServe(*fListen, nil)) }