diff --git a/config/resources/defaults.yaml b/config/resources/defaults.yaml index 6c74dd713..d513456c1 100644 --- a/config/resources/defaults.yaml +++ b/config/resources/defaults.yaml @@ -88,7 +88,7 @@ Monitoring: MetricAuthorization: true PromQLAuthorization: true AggregatePrefixes: ["/*"] - Retention: 360h + DataRetention: 360h Shoveler: MessageQueueProtocol: amqp PortLower: 9930 diff --git a/docs/parameters.yaml b/docs/parameters.yaml index 60e7261e6..5e75ace04 100644 --- a/docs/parameters.yaml +++ b/docs/parameters.yaml @@ -2255,7 +2255,7 @@ type: bool default: true components: ["origin", "cache", "director", "registry"] --- -name: Monitoring.Retention +name: Monitoring.DataRetention description: |+ The duration of which Prometheus should retain the monitoring data. type: duration diff --git a/param/parameters.go b/param/parameters.go index d0b75ae41..5c9d5534d 100644 --- a/param/parameters.go +++ b/param/parameters.go @@ -376,7 +376,7 @@ var ( Director_OriginCacheHealthTestInterval = DurationParam{"Director.OriginCacheHealthTestInterval"} Director_StatTimeout = DurationParam{"Director.StatTimeout"} Federation_TopologyReloadInterval = DurationParam{"Federation.TopologyReloadInterval"} - Monitoring_Retention = DurationParam{"Monitoring.Retention"} + Monitoring_DataRetention = DurationParam{"Monitoring.DataRetention"} Monitoring_TokenExpiresIn = DurationParam{"Monitoring.TokenExpiresIn"} Monitoring_TokenRefreshInterval = DurationParam{"Monitoring.TokenRefreshInterval"} Origin_SelfTestInterval = DurationParam{"Origin.SelfTestInterval"} diff --git a/param/parameters_struct.go b/param/parameters_struct.go index 87a737bb6..49daa3293 100644 --- a/param/parameters_struct.go +++ b/param/parameters_struct.go @@ -151,11 +151,11 @@ type Config struct { Monitoring struct { AggregatePrefixes []string `mapstructure:"aggregateprefixes"` DataLocation string `mapstructure:"datalocation"` + DataRetention time.Duration `mapstructure:"dataretention"` MetricAuthorization bool `mapstructure:"metricauthorization"` PortHigher int `mapstructure:"porthigher"` PortLower int `mapstructure:"portlower"` PromQLAuthorization bool `mapstructure:"promqlauthorization"` - Retention time.Duration `mapstructure:"retention"` TokenExpiresIn time.Duration `mapstructure:"tokenexpiresin"` TokenRefreshInterval time.Duration `mapstructure:"tokenrefreshinterval"` } `mapstructure:"monitoring"` @@ -448,11 +448,11 @@ type configWithType struct { Monitoring struct { AggregatePrefixes struct { Type string; Value []string } DataLocation struct { Type string; Value string } + DataRetention struct { Type string; Value time.Duration } MetricAuthorization struct { Type string; Value bool } PortHigher struct { Type string; Value int } PortLower struct { Type string; Value int } PromQLAuthorization struct { Type string; Value bool } - Retention struct { Type string; Value time.Duration } TokenExpiresIn struct { Type string; Value time.Duration } TokenRefreshInterval struct { Type string; Value time.Duration } } diff --git a/web_ui/prometheus.go b/web_ui/prometheus.go index e0b0035d2..ac936870a 100644 --- a/web_ui/prometheus.go +++ b/web_ui/prometheus.go @@ -413,7 +413,7 @@ func ConfigureEmbeddedPrometheus(ctx context.Context, engine *gin.Engine) error cfg.tsdb.OutOfOrderTimeWindow = promCfg.StorageConfig.TSDBConfig.OutOfOrderTimeWindow } - retention, err := model.ParseDuration(param.Monitoring_Retention.GetDuration().String()) + retention, err := model.ParseDuration(param.Monitoring_DataRetention.GetDuration().String()) if err != nil { // If we are here, it means that the duration that was set in the config is invalid return fmt.Errorf("failed to parse retention duration: %v", err)