Skip to content

Commit

Permalink
docs: add info about remotewrite client config in ruler (backport rel…
Browse files Browse the repository at this point in the history
…ease-3.1.x) (#14698)

Co-authored-by: Nikolay Andreev <[email protected]>
  • Loading branch information
loki-gh-app[bot] and nickandreev authored Oct 31, 2024
1 parent 663d355 commit 608ad4d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
15 changes: 15 additions & 0 deletions docs/sources/operations/recording-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion docs/sources/shared/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -4508,7 +4508,9 @@ remote_write:
# Deprecated: Use 'clients' instead. Configure remote write client.
[client: <RemoteWriteConfig>]
# 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: <map of string to RemoteWriteConfig>]
# Enable remote-write functionality.
Expand Down
2 changes: 1 addition & 1 deletion pkg/ruler/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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."`
Expand Down

0 comments on commit 608ad4d

Please sign in to comment.