Skip to content

Commit

Permalink
docs: add a tenant example to prometheus.remote_write.md (#5737)
Browse files Browse the repository at this point in the history
* Add a tenant example to prometheus.remote_write.md

This commit adds an example for pushing the metrics to a multi-tenant Mimir instance with non-default tenant.

It could be useful for people who have less experience with multi-tenant Mimir, but would like to have a clear example how to use recommended way for ingestion there.

* Update docs/sources/flow/reference/components/prometheus.remote_write.md

Add a missing article.

Co-authored-by: Clayton Cornell <[email protected]>

* formatting + more generic Mimir url in the snippet

* A minor nit

Co-authored-by: Mischa Thompson <[email protected]>

---------

Co-authored-by: Clayton Cornell <[email protected]>
Co-authored-by: Mischa Thompson <[email protected]>
(cherry picked from commit 1caf600)
  • Loading branch information
thecoldwine authored and grafanabot committed Nov 9, 2023
1 parent 545adc2 commit d336680
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/sources/flow/reference/components/prometheus.remote_write.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,24 @@ prometheus.scrape "demo" {
}
```


### Send metrics to a Mimir instance with a tenant specified

You can create a `prometheus.remote_write` component that sends your metrics to a specific tenant within the Mimir instance. This is useful when your Mimir instance is using more than one tenant:

```river
prometheus.remote_write "staging" {
// Send metrics to a Mimir instance
endpoint {
url = "http://mimir:9009/api/v1/push"
headers = {
"X-Scope-OrgID" = "staging"
}
}
}
```

### Send metrics to a managed service

You can create a `prometheus.remote_write` component that sends your metrics to a managed service, for example, Grafana Cloud. The Prometheus username and the Grafana Cloud API Key are injected in this example through environment variables.
Expand Down

0 comments on commit d336680

Please sign in to comment.