rule "extract_direct_url_params" when has_field("durl") && starts_with(to_string($message.durl),"direct_url=") then let res3 = to_string(split("=", to_string($message.durl), '1')[1]); let res4 = grok("%{URIPROTO:protokoll}://%{URIHOST:saphost}%{URIPATH:sappfad}", res3); set_field("saphost", res4["saphost"]); set_field("sappfad", res4["sappfad"]); let res5 = to_string(split("/", to_string(res4["sappfad"]), '1')[5]); set_field("reqart", res5); end
The repaired rule is this:
rule "extract_direct_url_params" when has_field("durl") && starts_with(to_string($message.durl),"direct_url=") then let res3 = to_string(split("=", to_string($message.durl))[1]); let res4 = grok("%{URIPROTO:protokoll}://%{URIHOST:saphost}%{URIPATH:sappfad}", res3); set_field("saphost", res4["saphost"]); set_field("sappfad", res4["sappfad"]); let res5 = to_string(split("/", to_string(res4["sappfad"]))[5]); set_field("reqart", res5); end
The line after then was the problem:
let res3 = to_string(split("=", to_string($message.durl), '1')[1]);