Browse Source

Merge pull request #6 from juergenhoetzel/handle-listen-errors

Report ListenAndServe errors
pull/1/head
ndecker 8 years ago
committed by GitHub
parent
commit
834e25023a
  1. 3
      main.go

3
main.go

@ -20,6 +20,7 @@ import (
"net/http" "net/http"
"sync" "sync"
"time" "time"
"log"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
@ -323,5 +324,5 @@ func main() {
prometheus.MustRegister(collect_errors) prometheus.MustRegister(collect_errors)
http.Handle("/metrics", prometheus.Handler()) http.Handle("/metrics", prometheus.Handler())
http.ListenAndServe(*flag_addr, nil) log.Fatal(http.ListenAndServe(*flag_addr, nil))
} }

Loading…
Cancel
Save