diff --git a/ctl/server.go b/ctl/server.go index 6c885d213..2f7ea063c 100644 --- a/ctl/server.go +++ b/ctl/server.go @@ -110,4 +110,7 @@ func BuildServerFlags(cmd *cobra.Command, srv *server.Command) { flags.DurationVar((*time.Duration)(&srv.Config.Postgres.WriteTimeout), "postgres.write-timeout", time.Duration(srv.Config.Postgres.WriteTimeout), "Timeout for writes on a postgres connection. (set 0 to disable)") flags.Uint32Var(&srv.Config.Postgres.MaxStartupSize, "postgres.max-startup-size", srv.Config.Postgres.MaxStartupSize, "Maximum acceptable size of a postgres startup packet, in bytes. (set 0 to disable)") flags.Uint16Var(&srv.Config.Postgres.ConnectionLimit, "postgres.connection-limit", srv.Config.Postgres.ConnectionLimit, "Maximum number of simultaneous postgres connections to allow. (set 0 to disable)") + + // Disk Usage refresh rate in minutes for ui/usage http endpoint + flags.IntVar(&srv.Config.DiskUsageRefreshRate, "disk-usage-refresh-rate", srv.Config.DiskUsageRefreshRate, "Number in minutes between recalculations of disk usage cache") } diff --git a/server/config.go b/server/config.go index f59040271..d6c12e881 100644 --- a/server/config.go +++ b/server/config.go @@ -224,6 +224,9 @@ type Config struct { // LookupDBDSN is an external database to connect to for `ExternalLookup` queries. LookupDBDSN string `toml:"lookup-db-dsn"` + + // Disk Usage refresh rate in minutes for ui/usage http endpoint + DiskUsageRefreshRate int `toml:"disk-ussage-refresh-rate"` } // MustValidate checks that all ports in a Config are unique and not zero.