Add basic authentication (#1683)
* Add basic authentication Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
This commit is contained in:
parent
b42819b69d
commit
202ecf9c9d
37 changed files with 5132 additions and 52 deletions
|
|
@ -15,13 +15,14 @@ package main
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/prometheus/common/promlog"
|
||||
"github.com/prometheus/common/promlog/flag"
|
||||
"net/http"
|
||||
_ "net/http/pprof"
|
||||
"os"
|
||||
"sort"
|
||||
|
||||
"github.com/prometheus/common/promlog"
|
||||
"github.com/prometheus/common/promlog/flag"
|
||||
|
||||
"github.com/go-kit/kit/log"
|
||||
"github.com/go-kit/kit/log/level"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
|
|
@ -189,7 +190,7 @@ func main() {
|
|||
|
||||
level.Info(logger).Log("msg", "Listening on", "address", *listenAddress)
|
||||
server := &http.Server{Addr: *listenAddress}
|
||||
if err := https.Listen(server, *configFile); err != nil {
|
||||
if err := https.Listen(server, *configFile, logger); err != nil {
|
||||
level.Error(logger).Log("err", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue