docs: mention HTTP sink configuration example for Vector

Follow-up 16eeb4e

Signed-off-by: hagen1778 <roman@victoriametrics.com>
(cherry picked from commit 4f55aa29db)
This commit is contained in:
hagen1778 2024-04-16 14:07:16 +02:00
parent 1660428e00
commit 3bddb10af8
No known key found for this signature in database
GPG key ID: 3BF75F3741CA9640

View file

@ -11,6 +11,9 @@ aliases:
--- ---
# Vector setup # Vector setup
## Elasticsearch sink
Specify [Elasticsearch sink type](https://vector.dev/docs/reference/configuration/sinks/elasticsearch/) in the `vector.toml` Specify [Elasticsearch sink type](https://vector.dev/docs/reference/configuration/sinks/elasticsearch/) in the `vector.toml`
for sending the collected logs to [VictoriaLogs](https://docs.victoriametrics.com/VictoriaLogs/): for sending the collected logs to [VictoriaLogs](https://docs.victoriametrics.com/VictoriaLogs/):
@ -140,6 +143,25 @@ For example, the following `vector.toml` config instructs Vector to store the da
ProjectID = "34" ProjectID = "34"
``` ```
## HTTP sink
Vector can be configured with [HTTP](https://vector.dev/docs/reference/configuration/sinks/http/) sink type
for sending data to [JSON stream API](https://docs.victoriametrics.com/victorialogs/data-ingestion/#json-stream-api):
```toml
[sinks.vlogs]
inputs = [ "your_input" ]
type = "http"
uri = "http://localhost:9428/insert/jsonline?_stream_fields=host,container_name&_msg_field=message&_time_field=timestamp"
encoding.codec = "json"
framing.method = "newline_delimited"
healthcheck.enabled = false
[sinks.vlogs.request.headers]
AccountID = "12"
ProjectID = "34"
```
See also: See also:
- [Data ingestion troubleshooting](https://docs.victoriametrics.com/VictoriaLogs/data-ingestion/#troubleshooting). - [Data ingestion troubleshooting](https://docs.victoriametrics.com/VictoriaLogs/data-ingestion/#troubleshooting).