mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-12 06:17:27 -08:00
Flag changes for 2.0
Fixes: prometheus/prometheus#2087 Signed-off-by: Goutham Veeramachaneni <cs14btech11014@iith.ac.in>
This commit is contained in:
parent
d407bd150c
commit
67dc73fd59
|
@ -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(
|
||||
|
|
|
@ -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),
|
||||
|
|
Loading…
Reference in a new issue