Vector is an observability data pipeline that collects , transforms , and routes logs , metrics to any vendor or destination. Vector is open source, cloud native and is the best performing tool in the market.
The various components of Vector allow it to have multiple deployment strategies . Vector can be deployed as an agent and/or aggregator into multiple topologies [ Distributed , Centralized and Stream ] .
Vector components are Sources , Transforms and Sinks.
Vector Source
A source defines where data is ingested from. A source defines where data is pulled from. There is an extensive list of sources including examples AWS , Docker Logs , Server Logs , Server Exec , SNMP , SYSLOG , Apache and Vector.
sources:
metrics:
type: host_metrics
collectors:
- cpu
- disk
- filesystem
- load
- host
- memory
- network
scrape_interval_secs: 15
my_source_id:
type: exec
Vector Transforms
Transform literally transform the raw data that are transported . This can be parsing , filtering , sampling or tagging. You can transform the data in the pipeline however you see fit. Example from the config.yaml file
transforms:
get_error_log:
type: filter
inputs:
- vector_error
condition: |
contains(string!(.message) , "error")
Vector Sinks
At the end of the pipeline , the information needs to be sent somewhere. The Sink is a destination for the events. The example below will send the errors from the transform set above to a log file. This is a simple implementation and data can be sent to Prometheus , AWS S3 Bucket , Kafka , etc.
sinks:
errors_to_file:
type: file
inputs:
- get_error_log
compression: none
encoding:
codec: json
path: /tmp/vector-error-%Y-%m-%d.log
Using Vector in combination with Prometheus / Grafana allows for power distributed monitoring systems.
Links:
https://vector.dev/
If you enjoy , please feel free to subscribe.
