This step-by-step guide will help you configure Vector to read and collect metrics from your sources using the Axiom sink.
Vector
axiom
sink.
@timestamp
field instead of _time
to specify the timestamp of the events. For more information, see Timestamp in legacy Vector versions.If you upgrade from Vector version v0.41.1 or earlier to a newer version, update your configuration. For more information, see Upgrade from legacy Vector version.file
method and the axiom
sink.
The example below configures Vector to read and collect logs from files and send them to Axiom.
vector.toml
with the following content:
VECTOR_SOURCE_ID
with the Vector source ID.
Replace PATH_TO_LOGS
with the path to the log files. For example, /var/log/**/*.log
.
Replace SINK_ID
with the sink ID.Replace API_TOKEN
with the Axiom API token you have generated. For added security, store the API token in an environment variable.Replace DATASET_NAME
with the name of the Axiom dataset where you want to send data.FIELD_TO_REMOVE
with the field you want to remove.Replace API_TOKEN
with the Axiom API token you have generated. For added security, store the API token in an environment variable.Replace DATASET_NAME
with the name of the Axiom dataset where you want to send data.file
method can make the code example above outdated. If this happens, please refer to the official Vector documentation on the file
method, and we kindly ask you to inform us of the issue using the feedback tool at the bottom of this page.API_TOKEN
with the Axiom API token you have generated. For added security, store the API token in an environment variable.Replace DATASET_NAME
with the name of the Axiom dataset where you want to send data.vector.toml
, with the following content:
API_TOKEN
with the Axiom API token you have generated. For added security, store the API token in an environment variable.Replace DATASET_NAME
with the name of the Axiom dataset where you want to send data.vector.toml
, with the following content:
API_TOKEN
with the Axiom API token you have generated. For added security, store the API token in an environment variable.Replace DATASET_NAME
with the name of the Axiom dataset where you want to send data.vector --config ./vector.toml
. This starts Vector and begins reading logs from the specified S3 bucket and sending them to the specified Axiom dataset.
vector.toml
, with the following code:
API_TOKEN
with the Axiom API token you have generated. For added security, store the API token in an environment variable.Replace DATASET_NAME
with the name of the Axiom dataset where you want to send data.vector --config /path/to/your/vector.toml
ngx_http_stub_status_module
module in your NGINX configuration.
/etc/nginx/nginx.conf
) and in your server
block, add:/metrics
endpoint on your server.
vector.toml
), and add the following:
API_TOKEN
with the Axiom API token you have generated. For added security, store the API token in an environment variable.Replace DATASET_NAME
with the name of the Axiom dataset where you want to send data.vector --config /path/to/your/vector.toml
vector.toml
, with the following code:
API_TOKEN
with the Axiom API token you have generated. For added security, store the API token in an environment variable.Replace DATASET_NAME
with the name of the Axiom dataset where you want to send data.vector.toml
, with the following code:
API_TOKEN
with the Axiom API token you have generated. For added security, store the API token in an environment variable.Replace DATASET_NAME
with the name of the Axiom dataset where you want to send data.@timestamp
field instead of _time
to specify the timestamp in the event data you send to Axiom. For example: {"@timestamp":"2022-04-14T21:30:30.658Z..."}
. For more information, see Requirements of the timestamp field. In the case of Vector version v0.41.1 or earlier, the requirements explained on the page apply to the @timestamp
field, not to _time
.
If you use Vector version v0.42.0 (released on October 21, 2024) or newer, use the _time
field as usual for other collectors.
timestamp
field to the _time
field and remap the logic.
Example vrl
file:
zstd
compression algorithm by default.
To set another compression algorithm, use the example below: