Vector configuration for ICE Server
Vector is used for streaming logs from an ICE Server. Use the following instructions to create a connection between Vector and an ICE Server with the option to secure it using TLS certs.
1. Add a section in /etc/vector/vector.toml:
#
# In this example, we are collecting all kubernetes logs
# from ICE OS VM 192.168.0.198
#
# "sources.K8S_CLUSTER" : User-friendly name of ICE Server
#
# "sinks.DATA_SOURCE_NAME" : User-friendly name of data source output
# "inputs" : It should point to "sources.K8S_CLUSTER"
# "path" : Location of sink's output file
[sources.ice_192_168_0_198_vector]
type = "vector"
address = "0.0.0.0:9000"
[sinks.ice_192_168_0_198_vector_out]
type = "file"
inputs = ["ice_192_168_0_198_vector"]
path = "/var/log/vector/k8s/ice_192_168_0_198.log"
encoding.codec = "raw_message"
7. For TLS:
A. Add the following in the source section:
tls.enabled = true
tls.ca_file = "/etc/vector/tls/tls.vector.ca_file"
tls.crt_file = "/etc/vector/tls/tls.vector.crt_file"
tls.key_file = "/etc/vector/tls/tls.vector.key_file"
B. The tls.ca_file should point to a .PEM file containing the root certificate and the intermediate certificate, if applicable.
C. The tls.crt_file should point to a .PEM file containing the Vector server certificate.
D. The tls.key_file should point to a private key file corresponding to tls.crt_file.
8. Start/restart Vector:
sudo systemctl restart vector
9. You should see ICE Server logs streaming to:
/var/log/vector/k8s/ice_192_168_0_198.log.