diff --git a/docs/sources/operations/recording-rules.md b/docs/sources/operations/recording-rules.md index fd5b8ae6cd5b5..cd7bdd2d301cb 100644 --- a/docs/sources/operations/recording-rules.md +++ b/docs/sources/operations/recording-rules.md @@ -74,6 +74,21 @@ so a `Persistent Volume` should be utilised. ## Remote-Write +### Client configuration + +Remote-write client configuration is fully compatible with [prometheus configuration format](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_write). + +```yaml +remote_write: + clients: + mimir: + url: http://mimir/api/v1/push + write_relabel_configs: + - action: replace + target_label: job + replacement: loki-recording-rules +``` + ### Per-Tenant Limits Remote-write can be configured at a global level in the base configuration, and certain parameters tuned specifically on diff --git a/docs/sources/shared/configuration.md b/docs/sources/shared/configuration.md index 13fcddde22fa5..f1bdb6bf2c7bd 100644 --- a/docs/sources/shared/configuration.md +++ b/docs/sources/shared/configuration.md @@ -5207,7 +5207,9 @@ remote_write: # Deprecated: Use 'clients' instead. Configure remote write client. [client: ] - # Configure remote write clients. A map with remote client id as key. + # Configure remote write clients. A map with remote client id as key. For + # details, see + # https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_write [clients: ] # Enable remote-write functionality. diff --git a/pkg/ruler/config.go b/pkg/ruler/config.go index 69293b91324a0..205fdd2c6f1cf 100644 --- a/pkg/ruler/config.go +++ b/pkg/ruler/config.go @@ -53,7 +53,7 @@ func (c *Config) Validate() error { type RemoteWriteConfig struct { Client *config.RemoteWriteConfig `yaml:"client,omitempty" doc:"deprecated|description=Use 'clients' instead. Configure remote write client."` - Clients map[string]config.RemoteWriteConfig `yaml:"clients,omitempty" doc:"description=Configure remote write clients. A map with remote client id as key."` + Clients map[string]config.RemoteWriteConfig `yaml:"clients,omitempty" doc:"description=Configure remote write clients. A map with remote client id as key. For details, see https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_write"` Enabled bool `yaml:"enabled"` ConfigRefreshPeriod time.Duration `yaml:"config_refresh_period"` AddOrgIDHeader bool `yaml:"add_org_id_header" doc:"description=Add X-Scope-OrgID header in remote write requests."`