diff --git a/docs/sources/configuration/_index.md b/docs/sources/configuration/_index.md index ef60a4225cbc..e448b2e474c1 100644 --- a/docs/sources/configuration/_index.md +++ b/docs/sources/configuration/_index.md @@ -372,7 +372,6 @@ results_cache: The `ruler_config` configures the Loki ruler. -The Ruler API is experimental. ```yaml # URL of alerts return path. @@ -753,7 +752,7 @@ ring: [flush_period: | default = 1m] # Enable the Ruler API. -# CLI flag: -experimental.ruler.enable-api +# CLI flag: -ruler.enable-api [enable_api: | default = false] ``` diff --git a/docs/sources/rules/_index.md b/docs/sources/rules/_index.md index fe4c94ab7648..92cc527a5394 100644 --- a/docs/sources/rules/_index.md +++ b/docs/sources/rules/_index.md @@ -255,7 +255,7 @@ jobs: One option to scale the Ruler is by scaling it horizontally. However, with multiple Ruler instances running they will need to coordinate to determine which instance will evaluate which rule. Similar to the ingesters, the Rulers establish a hash ring to divide up the responsibilities of evaluating rules. -The possible configurations are listed fully in the [configuration documentation](https://grafana.com/docs/loki/latest/configuration/), but in order to shard rules across multiple Rulers, the rules API must be enabled via flag (`-experimental.Ruler.enable-api`) or config file parameter. Secondly, the Ruler requires it's own ring be configured. From there the Rulers will shard and handle the division of rules automatically. Unlike ingesters, Rulers do not hand over responsibility: all rules are re-sharded randomly every time a Ruler is added to or removed from the ring. +The possible configurations are listed fully in the [configuration documentation](https://grafana.com/docs/loki/latest/configuration/), but in order to shard rules across multiple Rulers, the rules API must be enabled via flag (`-ruler.enable-api`) or config file parameter. Secondly, the Ruler requires it's own ring be configured. From there the Rulers will shard and handle the division of rules automatically. Unlike ingesters, Rulers do not hand over responsibility: all rules are re-sharded randomly every time a Ruler is added to or removed from the ring. A full sharding-enabled Ruler example is: diff --git a/pkg/ruler/config.go b/pkg/ruler/config.go index 8a40c77e5d95..d7b060bee673 100644 --- a/pkg/ruler/config.go +++ b/pkg/ruler/config.go @@ -18,6 +18,9 @@ type Config struct { func (c *Config) RegisterFlags(f *flag.FlagSet) { c.Config.RegisterFlags(f) c.RemoteWrite.RegisterFlags(f) + + // TODO(owen-d, 3.0.0): remove deprecated experimental prefix in Cortex if they'll accept it. + f.BoolVar(&c.Config.EnableAPI, "ruler.enable-api", false, "Enable the ruler api") } // Validate overrides the embedded cortex variant which expects a cortex limits struct. Instead copy the relevant bits over.