mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-23 12:31:07 +01:00
docs: mention multi-tenancy in docs (#4357)
The update should make understanding of multi-tenancy more clear for influxdb users. Signed-off-by: hagen1778 <roman@victoriametrics.com>
This commit is contained in:
parent
bf4711ecba
commit
1c3f50f791
@ -528,8 +528,10 @@ and stream plain InfluxDB line protocol data to the configured TCP and/or UDP ad
|
|||||||
|
|
||||||
VictoriaMetrics performs the following transformations to the ingested InfluxDB data:
|
VictoriaMetrics performs the following transformations to the ingested InfluxDB data:
|
||||||
|
|
||||||
* [db query arg](https://docs.influxdata.com/influxdb/v1.7/tools/api/#write-http-endpoint) is mapped into `db` label value
|
* [db query arg](https://docs.influxdata.com/influxdb/v1.7/tools/api/#write-http-endpoint) is mapped into `db`
|
||||||
unless `db` tag exists in the InfluxDB line. The `db` label name can be overridden via `-influxDBLabel` command-line flag.
|
[label](https://docs.victoriametrics.com/keyConcepts.html#labels) value unless `db` tag exists in the InfluxDB line.
|
||||||
|
The `db` label name can be overridden via `-influxDBLabel` command-line flag. If more strict data isolation is required,
|
||||||
|
read more about multi-tenancy [here](https://docs.victoriametrics.com/keyConcepts.html#multi-tenancy).
|
||||||
* Field names are mapped to time series names prefixed with `{measurement}{separator}` value, where `{separator}` equals to `_` by default. It can be changed with `-influxMeasurementFieldSeparator` command-line flag. See also `-influxSkipSingleField` command-line flag. If `{measurement}` is empty or if `-influxSkipMeasurement` command-line flag is set, then time series names correspond to field names.
|
* Field names are mapped to time series names prefixed with `{measurement}{separator}` value, where `{separator}` equals to `_` by default. It can be changed with `-influxMeasurementFieldSeparator` command-line flag. See also `-influxSkipSingleField` command-line flag. If `{measurement}` is empty or if `-influxSkipMeasurement` command-line flag is set, then time series names correspond to field names.
|
||||||
* Field values are mapped to time series values.
|
* Field values are mapped to time series values.
|
||||||
* Tags are mapped to Prometheus labels as-is.
|
* Tags are mapped to Prometheus labels as-is.
|
||||||
|
@ -531,8 +531,10 @@ and stream plain InfluxDB line protocol data to the configured TCP and/or UDP ad
|
|||||||
|
|
||||||
VictoriaMetrics performs the following transformations to the ingested InfluxDB data:
|
VictoriaMetrics performs the following transformations to the ingested InfluxDB data:
|
||||||
|
|
||||||
* [db query arg](https://docs.influxdata.com/influxdb/v1.7/tools/api/#write-http-endpoint) is mapped into `db` label value
|
* [db query arg](https://docs.influxdata.com/influxdb/v1.7/tools/api/#write-http-endpoint) is mapped into `db`
|
||||||
unless `db` tag exists in the InfluxDB line. The `db` label name can be overridden via `-influxDBLabel` command-line flag.
|
[label](https://docs.victoriametrics.com/keyConcepts.html#labels) value unless `db` tag exists in the InfluxDB line.
|
||||||
|
The `db` label name can be overridden via `-influxDBLabel` command-line flag. If more strict data isolation is required,
|
||||||
|
read more about multi-tenancy [here](https://docs.victoriametrics.com/keyConcepts.html#multi-tenancy).
|
||||||
* Field names are mapped to time series names prefixed with `{measurement}{separator}` value, where `{separator}` equals to `_` by default. It can be changed with `-influxMeasurementFieldSeparator` command-line flag. See also `-influxSkipSingleField` command-line flag. If `{measurement}` is empty or if `-influxSkipMeasurement` command-line flag is set, then time series names correspond to field names.
|
* Field names are mapped to time series names prefixed with `{measurement}{separator}` value, where `{separator}` equals to `_` by default. It can be changed with `-influxMeasurementFieldSeparator` command-line flag. See also `-influxSkipSingleField` command-line flag. If `{measurement}` is empty or if `-influxSkipMeasurement` command-line flag is set, then time series names correspond to field names.
|
||||||
* Field values are mapped to time series values.
|
* Field values are mapped to time series values.
|
||||||
* Tags are mapped to Prometheus labels as-is.
|
* Tags are mapped to Prometheus labels as-is.
|
||||||
|
@ -539,8 +539,10 @@ and stream plain InfluxDB line protocol data to the configured TCP and/or UDP ad
|
|||||||
|
|
||||||
VictoriaMetrics performs the following transformations to the ingested InfluxDB data:
|
VictoriaMetrics performs the following transformations to the ingested InfluxDB data:
|
||||||
|
|
||||||
* [db query arg](https://docs.influxdata.com/influxdb/v1.7/tools/api/#write-http-endpoint) is mapped into `db` label value
|
* [db query arg](https://docs.influxdata.com/influxdb/v1.7/tools/api/#write-http-endpoint) is mapped into `db`
|
||||||
unless `db` tag exists in the InfluxDB line. The `db` label name can be overridden via `-influxDBLabel` command-line flag.
|
[label](https://docs.victoriametrics.com/keyConcepts.html#labels) value unless `db` tag exists in the InfluxDB line.
|
||||||
|
The `db` label name can be overridden via `-influxDBLabel` command-line flag. If more strict data isolation is required,
|
||||||
|
read more about multi-tenancy [here](https://docs.victoriametrics.com/keyConcepts.html#multi-tenancy).
|
||||||
* Field names are mapped to time series names prefixed with `{measurement}{separator}` value, where `{separator}` equals to `_` by default. It can be changed with `-influxMeasurementFieldSeparator` command-line flag. See also `-influxSkipSingleField` command-line flag. If `{measurement}` is empty or if `-influxSkipMeasurement` command-line flag is set, then time series names correspond to field names.
|
* Field names are mapped to time series names prefixed with `{measurement}{separator}` value, where `{separator}` equals to `_` by default. It can be changed with `-influxMeasurementFieldSeparator` command-line flag. See also `-influxSkipSingleField` command-line flag. If `{measurement}` is empty or if `-influxSkipMeasurement` command-line flag is set, then time series names correspond to field names.
|
||||||
* Field values are mapped to time series values.
|
* Field values are mapped to time series values.
|
||||||
* Tags are mapped to Prometheus labels as-is.
|
* Tags are mapped to Prometheus labels as-is.
|
||||||
|
@ -45,10 +45,12 @@ with similarities and differences:
|
|||||||
or [fields](https://docs.influxdata.com/influxdb/v2.2/reference/key-concepts/data-elements/#field-key) in
|
or [fields](https://docs.influxdata.com/influxdb/v2.2/reference/key-concepts/data-elements/#field-key) in
|
||||||
VictoriaMetrics, metric name contains it all. If measurement contains more than 1 field, then for VictoriaMetrics
|
VictoriaMetrics, metric name contains it all. If measurement contains more than 1 field, then for VictoriaMetrics
|
||||||
it will be multiple metrics;
|
it will be multiple metrics;
|
||||||
* there are no [buckets](https://docs.influxdata.com/influxdb/v2.2/reference/key-concepts/data-elements/#bucket)
|
* there are no [databases](https://docs.influxdata.com/influxdb/v1.8/concepts/glossary/#database),
|
||||||
or [organizations](https://docs.influxdata.com/influxdb/v2.2/reference/key-concepts/data-elements/#organization), all
|
[buckets](https://docs.influxdata.com/influxdb/v2.2/reference/key-concepts/data-elements/#bucket)
|
||||||
|
or [organizations](https://docs.influxdata.com/influxdb/v2.2/reference/key-concepts/data-elements/#organization). All
|
||||||
data in VictoriaMetrics is stored in a global namespace or within
|
data in VictoriaMetrics is stored in a global namespace or within
|
||||||
a [tenant](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#multitenancy).
|
a [tenant](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#multitenancy).
|
||||||
|
See more about multi-tenancy [here](https://docs.victoriametrics.com/keyConcepts.html#multi-tenancy).
|
||||||
|
|
||||||
Let's consider the
|
Let's consider the
|
||||||
following [sample data](https://docs.influxdata.com/influxdb/v2.2/reference/key-concepts/data-elements/#sample-data)
|
following [sample data](https://docs.influxdata.com/influxdb/v2.2/reference/key-concepts/data-elements/#sample-data)
|
||||||
|
@ -34,6 +34,8 @@ You can be more specific here by saying `requests_success_total` (for only succe
|
|||||||
or `request_errors_total` (for requests which failed). Choosing a metric name is very important and supposed to clarify
|
or `request_errors_total` (for requests which failed). Choosing a metric name is very important and supposed to clarify
|
||||||
what is actually measured to every person who reads it, just like **variable names** in programming.
|
what is actually measured to every person who reads it, just like **variable names** in programming.
|
||||||
|
|
||||||
|
#### Labels
|
||||||
|
|
||||||
Every metric can contain additional meta-information in the form of label-value pairs:
|
Every metric can contain additional meta-information in the form of label-value pairs:
|
||||||
|
|
||||||
```
|
```
|
||||||
@ -53,6 +55,12 @@ requests_total{path="/", code="200"}
|
|||||||
{__name__="requests_total", path="/", code="200"}
|
{__name__="requests_total", path="/", code="200"}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Labels can be automatically attached to the [time series](#time-series)
|
||||||
|
written via [vmagent](https://docs.victoriametrics.com/vmagent.html#adding-labels-to-metrics)
|
||||||
|
or [Prometheus](https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#prometheus-setup).
|
||||||
|
VictoriaMetrics supports enforcing of label filters for [query API](https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#prometheus-querying-api-enhancements)
|
||||||
|
to emulate data isolation. However, the real data isolation can be achieved via [multi-tenancy](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#multitenancy).
|
||||||
|
|
||||||
#### Time series
|
#### Time series
|
||||||
|
|
||||||
A combination of a metric name and its labels defines a `time series`. For example,
|
A combination of a metric name and its labels defines a `time series`. For example,
|
||||||
@ -344,6 +352,18 @@ It is very important to keep under control the number of unique label values, si
|
|||||||
leads to a new [time series](#time-series). Try to avoid using volatile label values such as session ID or query ID in order to
|
leads to a new [time series](#time-series). Try to avoid using volatile label values such as session ID or query ID in order to
|
||||||
avoid excessive resource usage and database slowdown.
|
avoid excessive resource usage and database slowdown.
|
||||||
|
|
||||||
|
### Multi-tenancy
|
||||||
|
|
||||||
|
[Cluster version](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html) of VictoriaMetrics
|
||||||
|
supports [multi-tenancy](https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#multitenancy)
|
||||||
|
for data isolation.
|
||||||
|
|
||||||
|
Multi-tenancy can be emulated for [single-server](https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html)
|
||||||
|
version of VictoriaMetrics by adding [labels](#labels) on [write path](#write-data)
|
||||||
|
and enforcing [labels filtering](https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#prometheus-querying-api-enhancements)
|
||||||
|
on [read path](#query-data).
|
||||||
|
|
||||||
|
|
||||||
## Write data
|
## Write data
|
||||||
|
|
||||||
VictoriaMetrics supports both models used in modern monitoring applications: [push](#push-model) and [pull](#pull-model).
|
VictoriaMetrics supports both models used in modern monitoring applications: [push](#push-model) and [pull](#pull-model).
|
||||||
|
Loading…
Reference in New Issue
Block a user