diff --git a/Gopkg.lock b/Gopkg.lock index 4b863c0f..b9cd806e 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -35,6 +35,12 @@ packages = ["."] revision = "2efee857e7cfd4f3d0138cc3cbb1b4966962b93a" +[[projects]] + branch = "master" + name = "github.com/beorn7/perks" + packages = ["quantile"] + revision = "3a771d992973f24aa725d07868b467d1ddfceafb" + [[projects]] name = "github.com/davecgh/go-spew" packages = ["spew"] @@ -73,7 +79,8 @@ "ptypes/duration", "ptypes/timestamp" ] - revision = "4bd1920723d7b7c925de087aa32e2187708897f7" + revision = "b4deda0973fb4c70b50d226b1af49f3da59f5265" + version = "v1.1.0" [[projects]] name = "github.com/google/gofuzz" @@ -121,6 +128,12 @@ revision = "ca39e5af3ece67bbcda3d0f4f56a8e24d9f2dad4" version = "1.1.3" +[[projects]] + name = "github.com/matttproud/golang_protobuf_extensions" + packages = ["pbutil"] + revision = "c12348ce28de40eed0136aa2b644d0ee0650e56c" + version = "v1.0.1" + [[projects]] name = "github.com/modern-go/concurrent" packages = ["."] @@ -139,6 +152,42 @@ revision = "792786c7400a136282c1664665ae0a8db921c6c2" version = "v1.0.0" +[[projects]] + name = "github.com/prometheus/client_golang" + packages = [ + "prometheus", + "prometheus/promhttp" + ] + revision = "c5b7fccd204277076155f10851dad72b76a49317" + version = "v0.8.0" + +[[projects]] + branch = "master" + name = "github.com/prometheus/client_model" + packages = ["go"] + revision = "5c3871d89910bfb32f5fcab2aa4b9ec68e65a99f" + +[[projects]] + branch = "master" + name = "github.com/prometheus/common" + packages = [ + "expfmt", + "internal/bitbucket.org/ww/goautoneg", + "model" + ] + revision = "7600349dcfe1abd18d72d3a1770870d9800a7801" + +[[projects]] + branch = "master" + name = "github.com/prometheus/procfs" + packages = [ + ".", + "internal/util", + "nfs", + "xfs" + ] + revision = "05ee40e3a273f7245e8777337fc7b46e533a9a92" + [[projects]] name = "github.com/sirupsen/logrus" packages = [ @@ -412,6 +461,6 @@ [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "2455302b084f40825b4e778901469df1ffff326ff3fa5b708da7362f91c790e5" + inputs-digest = "bf2032d0afbea09aafb0db352827c9efe8c39e5479d51fbe38b1d42c70d6b104" solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index c8f5549b..a71d25e4 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -21,3 +21,11 @@ [[constraint]] name = "k8s.io/client-go" version = "~7.0.0" + +[[constraint]] + name = "github.com/prometheus/client_golang" + version = "0.8.0" + +[[override]] + name = "github.com/golang/protobuf" + version = "1.1.0" diff --git a/main.go b/main.go index fa741093..37ebb369 100644 --- a/main.go +++ b/main.go @@ -10,6 +10,7 @@ import ( "syscall" "time" + "github.com/prometheus/client_golang/prometheus/promhttp" log "github.com/sirupsen/logrus" "gopkg.in/alecthomas/kingpin.v2" @@ -161,10 +162,21 @@ func main() { ) if metricsAddress != "" { + http.Handle("/metrics", promhttp.Handler()) http.HandleFunc("/healthz", func(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "OK") }) + http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { + w.Write([]byte(` +