Vector

Vector

Vector

install

https://vector.dev/docs/setup/quickstart/

https://vector.dev/docs/setup/installation/

1
2
3
4
5
6
7
curl --proto '=https' --tlsv1.2 -sSf https://sh.vector.dev | bash
cp .vector/bin/vector /usr/bin/
cp -r .vector/etc/systemd/vector.service /lib/systemd/system/
# add /usr/local/vector/bin to your PATH
vector --version
vector 0.21.2 (x86_64-unknown-linux-musl 1f01009 2022-05-05)
mkdir /etc/vector

hello world

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
cat /etc/vector/config.toml
[sources.in]
type = "stdin"

[sinks.out]
inputs = ["in"]
type = "console"
encoding.codec = "text"

echo 'Hello world!' | vector --config /etc/vector/config.toml
2022-05-24T02:05:21.906572Z  INFO vector::app: Log level is enabled. level="vector=info,codec=info,vrl=info,file_source=info,tower_limit=trace,rdkafka=info,buffers=info,kube=info"
2022-05-24T02:05:21.906755Z  INFO vector::app: Loading configs. paths=["/etc/vector/config.toml"]
2022-05-24T02:05:21.909158Z  INFO vector::topology:🏃 Running healthchecks.
2022-05-24T02:05:21.909222Z  INFO vector::topology::builder: Healthcheck: Passed.
2022-05-24T02:05:21.909357Z  INFO vector: Vector has started. debug="false" version="0.21.2" arch="x86_64" build_id="1f01009 2022-05-05"
2022-05-24T02:05:21.909396Z  INFO vector::app: API is disabled, enable by setting `api.enabled` to `true` and use commands like `vector top`.
2022-05-24T02:05:21.909870Z  INFO vector::sources::stdin: Capturing STDIN.
2022-05-24T02:05:21.910075Z  INFO vector::shutdown: All sources have finished.
2022-05-24T02:05:21.910087Z  INFO vector: Vector has stopped.
2022-05-24T02:05:21.910119Z  INFO source{component_kind="source" component_id=in component_type=stdin component_name=in}: vector::sources::stdin: Finished sending.
Hello world!

sources or inputs