Replies: 4 comments 17 replies
-
I've been trying to get log namespacing to work, but I must be doing something wrong. The event metadata seems to be empty, but so does the actual underlying message. The only fields that are set are the events that are set explicitly. Here's an example config:
Here's sample events:
I even tried dropping the transform step by connecting the source and sink together and all I get is empty lines. |
Beta Was this translation helpful? Give feedback.
-
Thanks for implementing log namespacing! I played a bit with this feature now and I have the following feedback to give.
In general this feature is really nice and I can't wait to start using it in our Vector pipelines, specially when more metadata from the sources is added as we use fields like EDIT: I just noticed that the error message shown above is suggesting |
Beta Was this translation helpful? Give feedback.
-
I guess the More importantly, is the sources:
demo:
type: demo_logs
format: apache_common
transforms:
wrap1:
type: remap
inputs:
- demo
source: |
. = { "log1": ., "meta1": % }
reduce:
type: reduce
inputs:
- wrap1
max_events: 1
wrap2:
type: remap
inputs:
- reduce
source: |
. = { "log2": ., "meta2": % }
sinks:
debug:
type: file
encoding:
codec: native_json
inputs:
- wrap2
path: /tmp/vector.log
{
"log": {
"log2": {
"log1": "10.180.217.92 - benefritz [07/Aug/2023:19:54:45 +0000] \"PATCH /user/booperbot124 HTTP/1.0\" 401 9250",
"meta1": {
"demo_logs": {
"service": "vector"
},
"vector": {
"ingest_timestamp": "2023-08-07T19:54:45.201513665Z",
"source_type": "demo_logs"
}
}
},
"meta2": {}
}
} |
Beta Was this translation helpful? Give feedback.
-
Hello, today we found the limitation in Vector that events need to be objects and therefore we cannot assign Consider the following example pipeline: schema:
log_namespace: true
sources:
stdin:
type: stdin
transforms:
remap:
type: remap
inputs: ["stdin"]
source: '. = parse_json!(.)'
sinks:
console:
type: console
inputs: ["remap"]
encoding:
codec: json This pipeline simply reads from stdin, parses the input lines as JSON, assigns the parsing result into the event itself ( Now consider the following input data in JSON format: {"hello":"world"}
[{"charlie":"diego"},{"alice":"bob"}]
null
[null,null]
[{"edgar":"flavio"},null] It is understood that assigning arrays to the output event ( However, when we run Vector with the above input and pipeline, the result is this: {"hello":"world"}
{"charlie":"diego"}
{"alice":"bob"}
null
{"message":null}
{"message":null}
{"edgar":"flavio"}
{"message":null} As it can be seen, the lone |
Beta Was this translation helpful? Give feedback.
-
Discussion to collect feedback on the newly released log namespacing feature. See https://vector.dev/blog/log-namespacing/ for the feature announcement. Let us know what you think below!
Beta Was this translation helpful? Give feedback.
All reactions