-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathprovision-vector.sh
More file actions
29 lines (23 loc) · 985 Bytes
/
provision-vector.sh
File metadata and controls
29 lines (23 loc) · 985 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
set -euxo pipefail
pandora_ip_address="$(jq -r .CONFIG_PANDORA_IP /vagrant/shared/config.json)"
# see https://github.com/vectordotdev/vector/releases
# see https://hub.docker.com/r/timberio/vector/
# renovate: datasource=docker depName=timberio/vector
vector_version="0.30.0"
# destroy the existing loki container and data.
docker rm --force vector && rm -rf ~/vector && mkdir ~/vector
cd ~/vector
sed -E "s,http://localhost:3100,http://$pandora_ip_address:3100,g" /vagrant/vector.yml >vector.yml
# see https://vector.dev/docs/reference/configuration/sources/socket/
# see https://vector.dev/docs/reference/configuration/sinks/loki/
# see https://github.com/vectordotdev/vector
# see https://vector.dev/docs/setup/installation/platforms/docker/
docker run \
-d \
--restart unless-stopped \
--name vector \
-p 5170:5170 \
-v "$PWD/vector.yml:/etc/vector/vector.yml:ro" \
"timberio/vector:$vector_version-debian" \
-c /etc/vector/vector.yml