From 3bddb10af8049e5a9b434d1a747da94b44cd4c66 Mon Sep 17 00:00:00 2001 From: hagen1778 Date: Tue, 16 Apr 2024 14:07:16 +0200 Subject: [PATCH] docs: mention HTTP sink configuration example for Vector Follow-up 16eeb4e Signed-off-by: hagen1778 (cherry picked from commit 4f55aa29db44102b2484d8e1490bff202d4d918b) --- docs/VictoriaLogs/data-ingestion/Vector.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/VictoriaLogs/data-ingestion/Vector.md b/docs/VictoriaLogs/data-ingestion/Vector.md index dae3d1e6e..2b81a3a22 100644 --- a/docs/VictoriaLogs/data-ingestion/Vector.md +++ b/docs/VictoriaLogs/data-ingestion/Vector.md @@ -11,6 +11,9 @@ aliases: --- # Vector setup + +## Elasticsearch sink + 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/): @@ -140,6 +143,25 @@ For example, the following `vector.toml` config instructs Vector to store the da 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: - [Data ingestion troubleshooting](https://docs.victoriametrics.com/VictoriaLogs/data-ingestion/#troubleshooting).