mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-04 16:51:11 +01:00
docs: add multitenat endpoints usage for vmalert multitenancy (#7665)
### Describe Your Changes Please provide a brief description of the changes you made. Be as specific as possible to help others understand the purpose and impact of your modifications. ### Checklist The following checks are **mandatory**: - [ ] My change adheres [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/contributing/).
This commit is contained in:
parent
7374a8813d
commit
cdbe69e62b
@ -474,6 +474,23 @@ There are the following approaches exist for alerting and recording rules across
|
|||||||
For example, `-remoteWrite.url=http://vminsert:8480/insert/123/prometheus` would write recording
|
For example, `-remoteWrite.url=http://vminsert:8480/insert/123/prometheus` would write recording
|
||||||
rules to `AccountID=123`.
|
rules to `AccountID=123`.
|
||||||
|
|
||||||
|
* To use the [multitenant endpoint](https://docs.victoriametrics.com/cluster-victoriametrics/#multitenancy-via-labels) of vminsert as
|
||||||
|
the `-remoteWrite.url` and vmselect as the `-datasource.url`, add `extra_label` with tenant ID as an HTTP URL parameter for each group.
|
||||||
|
For example, run vmalert using `-datasource.url=http://vmselect:8481/select/multitenant/prometheus -remoteWrite.url=http://vminsert:8480/insert/multitenant/prometheus`,
|
||||||
|
along with the rule group:
|
||||||
|
```yaml
|
||||||
|
groups:
|
||||||
|
- name: rules_for_tenant_456:789
|
||||||
|
params:
|
||||||
|
extra_label: [vm_account_id=456,vm_project_id=789]
|
||||||
|
rules:
|
||||||
|
# Rules for accountID=456, projectID=789
|
||||||
|
```
|
||||||
|
|
||||||
|
The multitenant endpoint in vmselect is less efficient than [specifying tenants in URL](https://docs.victoriametrics.com/cluster-victoriametrics/#url-format).
|
||||||
|
|
||||||
|
For security considerations, it is recommended restricting access to multitenant endpoints only to trusted sources, since untrusted source may break per-tenant data by writing unwanted samples or get access to data of arbitrary tenants.
|
||||||
|
|
||||||
* To specify `tenant` parameter per each alerting and recording group if
|
* To specify `tenant` parameter per each alerting and recording group if
|
||||||
[enterprise version of vmalert](https://docs.victoriametrics.com/enterprise/) is used
|
[enterprise version of vmalert](https://docs.victoriametrics.com/enterprise/) is used
|
||||||
with `-clusterMode` command-line flag. For example:
|
with `-clusterMode` command-line flag. For example:
|
||||||
|
Loading…
Reference in New Issue
Block a user