Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add info about remotewrite client config in ruler (backport release-3.1.x) #14698

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading