You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: send-data/vector.mdx
+79-12Lines changed: 79 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,9 +16,11 @@ Vector is a lightweight and ultra-fast tool for building observability pipelines
16
16
17
17
Follow the [quickstart guide in the Vector documentation](https://vector.dev/docs/setup/quickstart/) to install Vector, and to configure sources and sinks.
18
18
19
-
## timestamp field
19
+
<Warning>
20
+
If you use Vector version v0.41.1 or earlier, use the `@timestamp` field instead of `_time` to specify the timestamp of the events. For more information, see [Timestamp in legacy Vector versions](#timestamp-in-legacy-vector-versions).
20
21
21
-
Logs and metrics sent via vector should use `@timestamp` as the timestamp field like: `{"@timestamp":"2022-04-14T21:30:30.658Z..."}`, not `_time`. Axiom accepts many date strings and timestamps without knowing the format in advance, including Unix Epoch, RFC3339, and ISO 8601.
22
+
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](#upgrade-from-legacy-vector-version).
23
+
</Warning>
22
24
23
25
## Configuration
24
26
@@ -65,6 +67,7 @@ type = "remap"
65
67
inputs = ["VECTOR_SOURCE_ID"]
66
68
source = '''
67
69
. = del(.FIELD_TO_REMOVE)
70
+
'''
68
71
69
72
[sinks.SINK_ID]
70
73
type = "axiom"
@@ -79,7 +82,7 @@ Replace `FIELD_TO_REMOVE` with the field you want to remove.
79
82
Any changes to Vector’s `file` method can make the code example above outdated. If this happens, please refer to the [official Vector documentation on the `file` method](https://vector.dev/docs/reference/configuration/sources/file/), and we kindly ask you to inform us of the issue using the feedback tool at the bottom of this page.
80
83
</Note>
81
84
82
-
## Send Kubernetes logs to Axiom
85
+
## Send Kubernetes logs to Axiom
83
86
84
87
Send Kubernetes logs to Axiom using the Kubernetes source.
85
88
@@ -117,7 +120,7 @@ TOKEN is used to ingest or query data to your dataset. API token can be generate
117
120
118
121
[See creating an API token for more](/reference/tokens)
119
122
120
-
## Send Docker logs to Axiom
123
+
## Send Docker logs to Axiom
121
124
122
125
To send Docker logs using the Axiom sink, you need to create a configuration file, for example, `vector.toml`, with the following content:
Vector collects logs from Docker and forward them to Axiom using the Axiom sink. You can view and analyze your logs in your dataset.
147
150
148
-
## Send AWS S3 logs to Axiom
151
+
## Send AWS S3 logs to Axiom
149
152
150
153
To send AWS S3 logs using the Axiom sink, create a configuration file, for example, `vector.toml`, with the following content:
151
154
@@ -155,7 +158,6 @@ type = "aws_s3"
155
158
bucket = "my-bucket"# replace with your bucket name
156
159
region = "us-west-2"# replace with the AWS region of your bucket
157
160
158
-
159
161
[sinks.axiom]
160
162
type = "axiom"
161
163
inputs = ["my_s3_source"]
@@ -165,7 +167,7 @@ token = "your_api_token" # replace with your Axiom API token
165
167
166
168
Finally, run Vector with the configuration file using `vector --config ./vector.toml`. This starts Vector and begins reading logs from the specified S3 bucket and sending them to the specified Axiom dataset.
167
169
168
-
## Send Kafka logs to Axiom
170
+
## Send Kafka logs to Axiom
169
171
170
172
To send Kafka logs using the Axiom sink, you need to create a configuration file, for example, `vector.toml`, with the following code:
171
173
@@ -186,7 +188,7 @@ token = "your_api_token" # replace with your Axiom API token
186
188
187
189
Finally, you can start Vector with your configuration file: `vector --config /path/to/your/vector.toml`
188
190
189
-
## Send NGINX metrics to Axiom
191
+
## Send NGINX metrics to Axiom
190
192
191
193
To send NGINX metrics using Vector to the Axiom sink, first enable NGINX to emit metrics, then use Vector to capture and forward those metrics. Here is a step-by-step guide:
192
194
@@ -230,7 +232,7 @@ token = "your_api_token" # replace with your Axiom API token
230
232
231
233
Finally, you can start Vector with your configuration file: `vector --config /path/to/your/vector.toml`
232
234
233
-
## Send Syslog logs to Axiom
235
+
## Send Syslog logs to Axiom
234
236
235
237
To send Syslog logs using the Axiom sink, you need to create a configuration file, for example, `vector.toml`, with the following code:
236
238
@@ -244,11 +246,11 @@ mode="tcp"
244
246
[sinks.axiom]
245
247
type="axiom"
246
248
inputs = [ "my_source_id" ] # required
247
-
dataset="your_dataset_name" # replace with the name of your Axiom dataset
249
+
dataset="your_dataset_name"# replace with the name of your Axiom dataset
248
250
token="your_api_token"# replace with your Axiom API token
249
251
```
250
252
251
-
## Send Prometheus metrics to Axiom
253
+
## Send Prometheus metrics to Axiom
252
254
253
255
To send Prometheus scrape metrics using the Axiom sink, you need to create a configuration file, for example, `vector.toml`, with the following code:
254
256
@@ -266,4 +268,69 @@ dataset = "your_prometheus_dataset" # replace with the name of your Axiom datas
266
268
token = "your_api_token"# replace with your Axiom API token
267
269
```
268
270
269
-
Check out the [advanced configuration on Batch, Buffer configuration, and Encoding on Vector Documentation](https://vector.dev/docs/reference/configuration/sinks/axiom/)
271
+
Check out the [advanced configuration on Batch, Buffer configuration, and Encoding on Vector Documentation](https://vector.dev/docs/reference/configuration/sinks/axiom/)
272
+
273
+
## Timestamp in legacy Vector versions
274
+
275
+
If you use Vector version v0.41.1 or earlier, use the `@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](/reference/field-restrictions#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`.
276
+
277
+
If you use Vector version v0.42.0 or newer, use the `_time` field as usual for other collectors.
278
+
279
+
### Upgrade from legacy Vector version
280
+
281
+
If you upgrade from Vector version v0.41.1 or earlier to a newer version, change all references from the `timestamp` field to the `_time` field and remap the logic.
282
+
283
+
Example `vrl` file:
284
+
285
+
```vrl example.vrl
286
+
# Set time explicitly rather than allowing Axiom to default to the current time
0 commit comments