templates/packer: vector expects a yaml configuration now
When switching to the new vector repos, the version was also bumped. The newer versions expect a yaml config.
This commit is contained in:
parent
aa156028b5
commit
ef44f22d89
1 changed files with 17 additions and 13 deletions
|
|
@ -7,19 +7,23 @@ echo "Writing vector config."
|
|||
REGION=$(curl -Ls http://169.254.169.254/latest/dynamic/instance-identity/document | jq -r .region)
|
||||
|
||||
sudo mkdir -p /etc/vector
|
||||
sudo tee /etc/vector/vector.toml > /dev/null << EOF
|
||||
[sources.journald]
|
||||
type = "journald"
|
||||
exclude_units = ["vector.service"]
|
||||
|
||||
[sinks.out]
|
||||
type = "aws_cloudwatch_logs"
|
||||
inputs = [ "journald" ]
|
||||
region = "${REGION}"
|
||||
endpoint = "${CLOUDWATCH_LOGS_ENDPOINT_URL}"
|
||||
group_name = "${CLOUDWATCH_LOG_GROUP}"
|
||||
stream_name = "worker_syslog_{{ host }}"
|
||||
encoding.codec = "json"
|
||||
sudo tee /etc/vector/vector.yaml > /dev/null << EOF
|
||||
sources:
|
||||
journald:
|
||||
type: journald
|
||||
exclude_units:
|
||||
- vector.service
|
||||
sinks:
|
||||
out:
|
||||
type: aws_cloudwatch_logs
|
||||
inputs:
|
||||
- journald
|
||||
region: ${REGION}
|
||||
endpoint: ${CLOUDWATCH_LOGS_ENDPOINT_URL}
|
||||
group_name: ${CLOUDWATCH_LOG_GROUP}
|
||||
stream_name: worker_syslog_{{ host }}
|
||||
encoding:
|
||||
codec: json
|
||||
EOF
|
||||
|
||||
sudo systemctl enable --now vector
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue