From f5beb04c53ae46bd9212e4a4c97275f864c29caa Mon Sep 17 00:00:00 2001 From: Victor Marmol Date: Mon, 23 Feb 2015 15:42:04 -0800 Subject: [PATCH] Adding Prometheus /metrics handler. --- pkg/kubelet/server.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/kubelet/server.go b/pkg/kubelet/server.go index 22a227269ac..8ffa0cb10f2 100644 --- a/pkg/kubelet/server.go +++ b/pkg/kubelet/server.go @@ -39,6 +39,7 @@ import ( "github.com/GoogleCloudPlatform/kubernetes/pkg/util/httpstream/spdy" "github.com/golang/glog" "github.com/google/cadvisor/info" + "github.com/prometheus/client_golang/prometheus" ) // Server is a http.Handler which exposes kubelet functionality over HTTP. @@ -110,6 +111,7 @@ func (s *Server) InstallDebuggingHandlers() { s.mux.HandleFunc("/logs/", s.handleLogs) s.mux.HandleFunc("/containerLogs/", s.handleContainerLogs) + s.mux.Handle("/metrics", prometheus.Handler()) } // error serializes an error object into an HTTP response.