From 67dc73fd590e01fbd4c47bfcf2169b02b426df2b Mon Sep 17 00:00:00 2001 From: Goutham Veeramachaneni Date: Fri, 16 Jun 2017 20:21:41 +0530 Subject: [PATCH] Flag changes for 2.0 Fixes: prometheus/prometheus#2087 Signed-off-by: Goutham Veeramachaneni --- cmd/prometheus/main.go | 10 +--------- web/web.go | 3 +-- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/cmd/prometheus/main.go b/cmd/prometheus/main.go index 935071594..81071b1df 100644 --- a/cmd/prometheus/main.go +++ b/cmd/prometheus/main.go @@ -99,10 +99,6 @@ func newRootCmd() *cobra.Command { &cfg.web.RoutePrefix, "web.route-prefix", "", "Prefix for the internal routes of web endpoints. Defaults to path of -web.external-url.", ) - rootCmd.PersistentFlags().StringVar( - &cfg.web.MetricsPath, "web.telemetry-path", "/metrics", - "Path under which to expose metrics.", - ) rootCmd.PersistentFlags().StringVar( &cfg.web.UserAssetsPath, "web.user-assets", "", "Path to static asset directory, available at /user.", @@ -122,7 +118,7 @@ func newRootCmd() *cobra.Command { // Storage. rootCmd.PersistentFlags().StringVar( - &cfg.localStoragePath, "storage.local.path", "data", + &cfg.localStoragePath, "storage.tsdb.path", "data", "Base path for metrics storage.", ) rootCmd.PersistentFlags().BoolVar( @@ -141,10 +137,6 @@ func newRootCmd() *cobra.Command { &cfg.tsdb.Retention, "storage.tsdb.retention", "How long to retain samples in the storage.", ) - rootCmd.PersistentFlags().StringVar( - &cfg.localStorageEngine, "storage.local.engine", "persisted", - "Local storage engine. Supported values are: 'persisted' (full local storage with on-disk persistence) and 'none' (no local storage).", - ) // Alertmanager. rootCmd.PersistentFlags().IntVar( diff --git a/web/web.go b/web/web.go index 37c18fc8e..b7742e8cf 100644 --- a/web/web.go +++ b/web/web.go @@ -121,7 +121,6 @@ type Options struct { MaxConnections int ExternalURL *url.URL RoutePrefix string - MetricsPath string UseLocalAssets bool UserAssetsPath string ConsoleTemplatesPath string @@ -186,7 +185,7 @@ func New(o *Options) *Handler { router.Get("/heap", instrf("heap", dumpHeap)) - router.Get(o.MetricsPath, prometheus.Handler().ServeHTTP) + router.Get("/metrics", prometheus.Handler().ServeHTTP) router.Get("/federate", instrh("federate", httputil.CompressionHandler{ Handler: http.HandlerFunc(h.federation),