path problem, how can i solve this ? #10739
-
Hi there,
With this construct, vector aborts with the error message that it cannot find the field for i have understood that this is a |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 6 replies
-
Ok. took another path like the one in the master pipeline, so it seems to work. |
Beta Was this translation helpful? Give feedback.
-
Can you share an example event thats coming into that One thing that I notice immediately about the script is this: if exists(.sophos.xg.url) {
.url.original = del(.sophos.xg.url)
}
# Everything below assumes the above `if` statement is true,
# which suggests everything below should be included in the
# above block. Otherwise you could be calling these functions
# on fields that don't exist and erroring.
. = parse_url!(.url.original)
.url.domain = del(.host)
.url.path = del(.path)
.url.scheme = del(.scheme)
.url.fragment = del(.fragment)
.url.password = del(.password)
.url.username = del(.username)
.url.port = del(.xg.port)
.url.query = del(.query) That is to say, the following seems more correct and robust: if exists(.sophos.xg.url) {
.url.original = del(.sophos.xg.url)
. = parse_url!(.url.original)
.url.domain = del(.host)
.url.path = del(.path)
.url.scheme = del(.scheme)
.url.fragment = del(.fragment)
.url.password = del(.password)
.url.username = del(.username)
.url.port = del(.xg.port)
.url.query = del(.query)
} |
Beta Was this translation helpful? Give feedback.
-
@spencergilbert Spencer |
Beta Was this translation helpful? Give feedback.
Can you share an example event thats coming into that
remap
component, as well as what you'd expect the event to look like after?One thing that I notice immediately about the script is this: