mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-23 12:31:07 +01:00
doc: address review feedback
Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>
This commit is contained in:
parent
1a834b4210
commit
0adec48182
24
README.md
24
README.md
@ -588,8 +588,6 @@ curl -d 'measurement,tag1=value1,tag2=value2 field1=123,field2=1.23' -X POST 'ht
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
Please, note that VictoriaMetrics also exposes endpoint for InfluxDB v2 HTTP API at `/influx/api/v2/write` and `/api/v2/write`.
|
|
||||||
|
|
||||||
An arbitrary number of lines delimited by '\n' (aka newline char) can be sent in a single request.
|
An arbitrary number of lines delimited by '\n' (aka newline char) can be sent in a single request.
|
||||||
After that the data may be read via [/api/v1/export](#how-to-export-data-in-json-line-format) endpoint:
|
After that the data may be read via [/api/v1/export](#how-to-export-data-in-json-line-format) endpoint:
|
||||||
|
|
||||||
@ -619,6 +617,28 @@ Some plugins for Telegraf such as [fluentd](https://github.com/fangli/fluent-plu
|
|||||||
or [Juniper/jitmon](https://github.com/Juniper/jtimon) send `SHOW DATABASES` query to `/query` and expect a particular database name in the response.
|
or [Juniper/jitmon](https://github.com/Juniper/jtimon) send `SHOW DATABASES` query to `/query` and expect a particular database name in the response.
|
||||||
Comma-separated list of expected databases can be passed to VictoriaMetrics via `-influx.databaseNames` command-line flag.
|
Comma-separated list of expected databases can be passed to VictoriaMetrics via `-influx.databaseNames` command-line flag.
|
||||||
|
|
||||||
|
### How to send data in InfluxDB v2 format
|
||||||
|
|
||||||
|
VictoriaMetrics exposes endpoint for InfluxDB v2 HTTP API at `/influx/api/v2/write` and `/api/v2/write`.
|
||||||
|
|
||||||
|
|
||||||
|
In order to write data with InfluxDB line protocol to local VictoriaMetrics using `curl`:
|
||||||
|
|
||||||
|
<div class="with-copy" markdown="1">
|
||||||
|
|
||||||
|
```console
|
||||||
|
curl -d 'measurement,tag1=value1,tag2=value2 field1=123,field2=1.23' -X POST 'http://localhost:8428/api/v2/write'
|
||||||
|
```
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
The `/api/v1/export` endpoint should return the following response:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{"metric":{"__name__":"measurement_field1","tag1":"value1","tag2":"value2"},"values":[123],"timestamps":[1695902762311]}
|
||||||
|
{"metric":{"__name__":"measurement_field2","tag1":"value1","tag2":"value2"},"values":[1.23],"timestamps":[1695902762311]}
|
||||||
|
```
|
||||||
|
|
||||||
## How to send data from Graphite-compatible agents such as [StatsD](https://github.com/etsy/statsd)
|
## How to send data from Graphite-compatible agents such as [StatsD](https://github.com/etsy/statsd)
|
||||||
|
|
||||||
Enable Graphite receiver in VictoriaMetrics by setting `-graphiteListenAddr` command line flag. For instance,
|
Enable Graphite receiver in VictoriaMetrics by setting `-graphiteListenAddr` command line flag. For instance,
|
||||||
|
@ -591,8 +591,6 @@ curl -d 'measurement,tag1=value1,tag2=value2 field1=123,field2=1.23' -X POST 'ht
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
Please, note that VictoriaMetrics also exposes endpoint for InfluxDB v2 HTTP API at `/influx/api/v2/write` and `/api/v2/write`.
|
|
||||||
|
|
||||||
An arbitrary number of lines delimited by '\n' (aka newline char) can be sent in a single request.
|
An arbitrary number of lines delimited by '\n' (aka newline char) can be sent in a single request.
|
||||||
After that the data may be read via [/api/v1/export](#how-to-export-data-in-json-line-format) endpoint:
|
After that the data may be read via [/api/v1/export](#how-to-export-data-in-json-line-format) endpoint:
|
||||||
|
|
||||||
@ -622,6 +620,28 @@ Some plugins for Telegraf such as [fluentd](https://github.com/fangli/fluent-plu
|
|||||||
or [Juniper/jitmon](https://github.com/Juniper/jtimon) send `SHOW DATABASES` query to `/query` and expect a particular database name in the response.
|
or [Juniper/jitmon](https://github.com/Juniper/jtimon) send `SHOW DATABASES` query to `/query` and expect a particular database name in the response.
|
||||||
Comma-separated list of expected databases can be passed to VictoriaMetrics via `-influx.databaseNames` command-line flag.
|
Comma-separated list of expected databases can be passed to VictoriaMetrics via `-influx.databaseNames` command-line flag.
|
||||||
|
|
||||||
|
### How to send data in InfluxDB v2 format
|
||||||
|
|
||||||
|
VictoriaMetrics exposes endpoint for InfluxDB v2 HTTP API at `/influx/api/v2/write` and `/api/v2/write`.
|
||||||
|
|
||||||
|
|
||||||
|
In order to write data with InfluxDB line protocol to local VictoriaMetrics using `curl`:
|
||||||
|
|
||||||
|
<div class="with-copy" markdown="1">
|
||||||
|
|
||||||
|
```console
|
||||||
|
curl -d 'measurement,tag1=value1,tag2=value2 field1=123,field2=1.23' -X POST 'http://localhost:8428/api/v2/write'
|
||||||
|
```
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
The `/api/v1/export` endpoint should return the following response:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{"metric":{"__name__":"measurement_field1","tag1":"value1","tag2":"value2"},"values":[123],"timestamps":[1695902762311]}
|
||||||
|
{"metric":{"__name__":"measurement_field2","tag1":"value1","tag2":"value2"},"values":[1.23],"timestamps":[1695902762311]}
|
||||||
|
```
|
||||||
|
|
||||||
## How to send data from Graphite-compatible agents such as [StatsD](https://github.com/etsy/statsd)
|
## How to send data from Graphite-compatible agents such as [StatsD](https://github.com/etsy/statsd)
|
||||||
|
|
||||||
Enable Graphite receiver in VictoriaMetrics by setting `-graphiteListenAddr` command line flag. For instance,
|
Enable Graphite receiver in VictoriaMetrics by setting `-graphiteListenAddr` command line flag. For instance,
|
||||||
|
@ -599,8 +599,6 @@ curl -d 'measurement,tag1=value1,tag2=value2 field1=123,field2=1.23' -X POST 'ht
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
Please, note that VictoriaMetrics also exposes endpoint for InfluxDB v2 HTTP API at `/influx/api/v2/write` and `/api/v2/write`.
|
|
||||||
|
|
||||||
An arbitrary number of lines delimited by '\n' (aka newline char) can be sent in a single request.
|
An arbitrary number of lines delimited by '\n' (aka newline char) can be sent in a single request.
|
||||||
After that the data may be read via [/api/v1/export](#how-to-export-data-in-json-line-format) endpoint:
|
After that the data may be read via [/api/v1/export](#how-to-export-data-in-json-line-format) endpoint:
|
||||||
|
|
||||||
@ -630,6 +628,28 @@ Some plugins for Telegraf such as [fluentd](https://github.com/fangli/fluent-plu
|
|||||||
or [Juniper/jitmon](https://github.com/Juniper/jtimon) send `SHOW DATABASES` query to `/query` and expect a particular database name in the response.
|
or [Juniper/jitmon](https://github.com/Juniper/jtimon) send `SHOW DATABASES` query to `/query` and expect a particular database name in the response.
|
||||||
Comma-separated list of expected databases can be passed to VictoriaMetrics via `-influx.databaseNames` command-line flag.
|
Comma-separated list of expected databases can be passed to VictoriaMetrics via `-influx.databaseNames` command-line flag.
|
||||||
|
|
||||||
|
### How to send data in InfluxDB v2 format
|
||||||
|
|
||||||
|
VictoriaMetrics exposes endpoint for InfluxDB v2 HTTP API at `/influx/api/v2/write` and `/api/v2/write`.
|
||||||
|
|
||||||
|
|
||||||
|
In order to write data with InfluxDB line protocol to local VictoriaMetrics using `curl`:
|
||||||
|
|
||||||
|
<div class="with-copy" markdown="1">
|
||||||
|
|
||||||
|
```console
|
||||||
|
curl -d 'measurement,tag1=value1,tag2=value2 field1=123,field2=1.23' -X POST 'http://localhost:8428/api/v2/write'
|
||||||
|
```
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
The `/api/v1/export` endpoint should return the following response:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{"metric":{"__name__":"measurement_field1","tag1":"value1","tag2":"value2"},"values":[123],"timestamps":[1695902762311]}
|
||||||
|
{"metric":{"__name__":"measurement_field2","tag1":"value1","tag2":"value2"},"values":[1.23],"timestamps":[1695902762311]}
|
||||||
|
```
|
||||||
|
|
||||||
## How to send data from Graphite-compatible agents such as [StatsD](https://github.com/etsy/statsd)
|
## How to send data from Graphite-compatible agents such as [StatsD](https://github.com/etsy/statsd)
|
||||||
|
|
||||||
Enable Graphite receiver in VictoriaMetrics by setting `-graphiteListenAddr` command line flag. For instance,
|
Enable Graphite receiver in VictoriaMetrics by setting `-graphiteListenAddr` command line flag. For instance,
|
||||||
|
Loading…
Reference in New Issue
Block a user