Hi,
I have a problem using “set_fields” function in pipelines.
I use a regex to extract a value from the “$message.message” field.
rule “XXXX”
when
then
let s = regex ("^ (. +) \ | (. +) \ | (. +) \ | (. +) \ | (. +) \ | (. +) \ | ( . +) \ | (. +) \ | (. +) ", to_string ( message.message));
…
set_fields(key_value(to_string(s[“4”]), “;”, “=”, true, true, “take_first”, " ", " "), “PREFIX_NAME_”);
end
regex group 4, can assume values such as those listed below.
s ["4"]
V = 238; P = 438; C = 40; N = 292
P = 622
V = 131; P = 504
V = 156; P = 456; C = 43; N = 107
how can I define that every single field created with the set_fields function is a long type and not a string type as default?