What good is Vector if you can't deploy it? Fortunately, deploying Vector is straightforward. Vector is written in Rust and compiles to a single binary makign installation as easy as copying the binary to your host. Beyond that, you'll want to think strategically about how you deploy Vector. This is where Vector differs from other tools, and we'll cover that here.
Before we get into the installation tutorial, let's touch on some basic Vector deployment concepts. We've had the fortunate opportunity of working with many different companies deploying Vector, and all of their approaches can be broken down into two basic concepts: strategies and topologies.
Roles refer to the various deployment roles Vector serves to build an end-to-end data platform.
Roles refer to data collection on a single host. It's the very first thing you'll think about when deploying Vector. For example, are you operationally proficient and comfortable installing Vector directly on each of your host? Or are you an app developer only concerned with data collection for your service? Each context requires a different deployment strategy! To solve this, we've broken down deploying Vector into three basic strategies. These are best explained with diagrams, and covered in more detail in our docs.
Topologies refer to the high-level network that your Vector instances create to get data from A to B -- the zoomed out perspective. This, again, is largely dependent on your environment and downstream storages. We've broken these down into three basic examples. Use these as guidelines to form your own topology. These are best explained with diagrams, and covered in more detail in our docs.
Now it's time to get to business! This tutorial will walk through the simple act of deploying Vector within your environment.
Add the Vector repocurl -1sLf \'https://repositories.timber.io/public/vector/cfg/setup/bash.rpm.sh' \| sudo -E bash
Install Vectorsudo yum install vector
Configure Vectorcat <<-'VECTORCFG' > /etc/vector/vector.toml# Vector's API for introspection[api]enabled = trueaddress = "127.0.0.1:8686"# Host-level logs[sources.logs]type = "journald"# Host-level metrics (cpu, memory, disk, etc)[sources.host_metrics]type = "host_metrics"# Vector's own internal metrics[sources.internal_metrics]type = "internal_metrics"# --> Add transforms here to parse, enrich, and process data# print all events, replace this with your desired sink(s)# https://vector.dev/docs/reference/sinks/[sinks.out]type = "console"inputs = [ "logs", "host_metrics", "internal_metrics" ]encoding.codec = "json"VECTORCFG
Restart Vectorsudo systemctl restart vector
Observe Vectorsudo journalctl -fu vectorexplain this command