diff --git a/cmd/migrate/main.go b/cmd/migrate/main.go index 477afe4a9c86..b60a8533c984 100644 --- a/cmd/migrate/main.go +++ b/cmd/migrate/main.go @@ -24,6 +24,7 @@ import ( "github.com/grafana/loki/pkg/storage/config" "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper" "github.com/grafana/loki/pkg/util/cfg" + "github.com/grafana/loki/pkg/util/constants" util_log "github.com/grafana/loki/pkg/util/log" "github.com/grafana/loki/pkg/validation" ) @@ -48,7 +49,7 @@ func main() { batch := flag.Int("batchLen", 500, "Specify how many chunks to read/write in one batch") shardBy := flag.Duration("shardBy", 6*time.Hour, "Break down the total interval into shards of this size, making this too small can lead to syncing a lot of duplicate chunks") parallel := flag.Int("parallel", 8, "How many parallel threads to process each shard") - metricsNamespace := flag.String("metrics.namespace", "cortex", "Namespace of the generated metrics") + metricsNamespace := flag.String("metrics.namespace", constants.Loki, "Namespace of the generated metrics") flag.Parse() go func() { diff --git a/pkg/loki/loki.go b/pkg/loki/loki.go index 54a0a52275dc..4c30f9007a34 100644 --- a/pkg/loki/loki.go +++ b/pkg/loki/loki.go @@ -149,7 +149,7 @@ func (c *Config) RegisterFlags(f *flag.FlagSet) { f.DurationVar(&c.ShutdownDelay, "shutdown-delay", 0, "How long to wait between SIGTERM and shutdown. After receiving SIGTERM, Loki will report 503 Service Unavailable status via /ready endpoint.") - f.StringVar(&c.MetricsNamespace, "metrics-namespace", "cortex", "Namespace of the metrics that in previous releases had cortex as namespace.") + f.StringVar(&c.MetricsNamespace, "metrics-namespace", "loki", "Namespace of the metrics that in previous releases had cortex as namespace.") c.registerServerFlagsWithChangedDefaultValues(f) c.Common.RegisterFlags(f)