I am trying to write a parser extension for JUNIPER FIREWALL. I am trying to map the field URL to target.url but when I try and validate the parser it fails with “failed to evaluate expression: generic::invalid_argument: \"domain\" not found in state data". How do I get it to only match the extension when it sees this specific log type that the prebuilt parser doesn’t fully parse out.
The 'Not Found State Data' error typically occurs when the fields are initially not mapped as null
Try mapping the domain field as “domain” => “” and then try validating.
Thanks for the response.
If I add:
mutate {
replace => {
"domain" => ""
}
}
Then I am getting the following:
generic::unknown: pipeline.ParseLogEntry failed: LOG_PARSING_CBN_ERROR: "generic::internal: pipeline failed: filter grok (2) failed: field \"domain\" already exists in data and is not overwriteable"
Please share me your parser code and ample log I will try it in my lab environment and let you know.
I have tested and the URL field is getting parsed, please refer the screenshot.
Thanks for the response. This is pretty much the way I originally had the parser syntax. The issue is when I try an validate, it fails because the log is different from what I wrote the parser against.
Error: generic::unknown: pipeline.ParseLogEntry failed: LOG_PARSING_CBN_ERROR: "generic::invalid_argument: pipeline failed: filter conditional (3) failed: failed to evaluate expression: generic::invalid_argument: \"domain\" not found in state data "Log: Jul 30 15:03:13 test-01-abc-gw AB_FLOW: AB_FLOW_SESSION_CREATE: session created 1.1.1.1/57720->2.2.2.2/443 0x0 junos-https 10.10.10.10/17381->8.8.8.8/443 0x0 source rule from-test-to-public-rule N/A N/A 6 Allow-Workload-Zone-Access-To-Internet ABC-Workload-Zone SL-PUBLIC [removed by moderator] N/A(N/A) ae0.917 UNKNOWN UNKNOWN UNKNOWN N/A N/A -1 N/A N/A N/A Off root N/A N/A N/A N/A
So the question is how do I get the Parser Extension I wrote to parse when it sees a log like this: