-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable API support and replace placeholder variables with environment…
… variables for better configuration management.
- Loading branch information
Showing
2 changed files
with
43 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,45 @@ | ||
# API Support | ||
[api] | ||
enabled = true | ||
address = "0.0.0.0:8686" | ||
|
||
# TCP source for incoming JSON data | ||
[sources.socket_tcp] | ||
type = "socket" | ||
address = "0.0.0.0:9001" | ||
mode = "tcp" | ||
max_length = 1024000 | ||
type = "socket" | ||
address = "0.0.0.0:9001" | ||
mode = "tcp" | ||
max_length = 1024000 | ||
|
||
# UDP source for incoming JSON data | ||
[sources.socket_udp] | ||
type = "socket" | ||
address = "0.0.0.0:9002" | ||
mode = "udp" | ||
max_length = 1024000 | ||
type = "socket" | ||
address = "0.0.0.0:9002" | ||
mode = "udp" | ||
max_length = 1024000 | ||
|
||
# Transform: Parse incoming JSON and isolate the message field | ||
# Transform: Parse incoming JSON | ||
[transforms.parse_json] | ||
type = "remap" | ||
inputs = ["socket_tcp", "socket_udp"] | ||
source = ''' | ||
.kinesis_stream_name = .kinesis_stream_name | ||
.aws_region = .aws_region | ||
.aws_access_key_id = .aws_access_key_id | ||
.aws_secret_access_key = .aws_secret_access_key | ||
. = parse_json!(.message) | ||
type = "remap" | ||
inputs = ["socket_tcp", "socket_udp"] | ||
source = ''' | ||
. = parse_json!(.) | ||
''' | ||
|
||
# Kinesis sink with dynamically set stream name and region | ||
[sinks.kinesis_dynamic] | ||
type = "aws_kinesis_streams" | ||
inputs = ["parse_json"] | ||
stream_name = "{{kinesis_stream_name}}" | ||
region = "{{aws_region}}" | ||
auth.access_key_id = "{{aws_access_key_id}}" | ||
auth.secret_access_key = "{{aws_secret_access_key}}" | ||
encoding.codec = "json" | ||
type = "aws_kinesis_streams" | ||
inputs = ["parse_json"] | ||
stream_name = "${VECTOR_AWS_KINESIS_STREAM_NAME}" | ||
region = "${VECTOR_AWS_KINESIS_REGION}" | ||
auth.access_key_id = "${VECTOR_AWS_KINESIS_ACCESS_KEY_ID}" | ||
auth.secret_access_key = "${VECTOR_AWS_KINESIS_SECRET_ACCESS_KEY}" | ||
encoding.codec = "json" | ||
|
||
# Optional: Configure batching to optimize network usage | ||
batch.max_bytes = 1024000 | ||
batch.timeout_secs = 1 | ||
# Optional: Configure batching to optimize network usage | ||
batch.max_bytes = 1024000 | ||
batch.timeout_secs = 1 | ||
|
||
# Retry settings | ||
request.in_flight_limit = 5 | ||
request.retry_attempts = 10 | ||
request.timeout_secs = 30 | ||
# Retry settings | ||
request.in_flight_limit = 5 | ||
request.retry_attempts = 10 | ||
request.timeout_secs = 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters