Splunk Search

Event correlation with specific event filtering

strangelaw
Explorer

I have following search:

index=pfsense OR index=otherindex verdict=pass | stats values(destip) AS fieldA, values(otherfield) AS fieldB, values(_time) as fieldC | mvexpand fieldA | mvexpand fieldC | eval matching=if(match(fieldA,fieldB),"1","0") | where matching > 0 | eval fieldC=strftime(fieldC,"%d/%m/%y %H:%M:%S") | table fieldA, fieldB, fieldC, verdict | rename verdict AS "Firewall verdict", fieldA AS "Destination IP", fieldB AS "otherfield", fieldC AS "Event time"

My problem is that verdict (as pass or block) which should be per search now only for "pass" does not follow till table. If I remove the verdict - it works, just without telling to select only passed events. The fields do exist.

Any idea how to make search working so that I can filter the whole search by verdict?

0 Karma
1 Solution

poete
Builder

Hello, did you try this?

index=pfsense OR **(**index=otherindex **AND** verdict=pass**)** | stats values(destip) AS fieldA, values(otherfield) AS fieldB, values(_time) as fieldC | mvexpand fieldA | mvexpand fieldC | eval matching=if(match(fieldA,fieldB),"1","0") | where matching > 0 | eval fieldC=strftime(fieldC,"%d/%m/%y %H:%M:%S") | table fieldA, fieldB, fieldC, verdict | rename verdict AS "Firewall verdict", fieldA AS "Destination IP", fieldB AS "otherfield", fieldC AS "Event time"

View solution in original post

0 Karma

poete
Builder

Hello, did you try this?

index=pfsense OR **(**index=otherindex **AND** verdict=pass**)** | stats values(destip) AS fieldA, values(otherfield) AS fieldB, values(_time) as fieldC | mvexpand fieldA | mvexpand fieldC | eval matching=if(match(fieldA,fieldB),"1","0") | where matching > 0 | eval fieldC=strftime(fieldC,"%d/%m/%y %H:%M:%S") | table fieldA, fieldB, fieldC, verdict | rename verdict AS "Firewall verdict", fieldA AS "Destination IP", fieldB AS "otherfield", fieldC AS "Event time"
0 Karma

poete
Builder

( is a bold parenthesis)

0 Karma

strangelaw
Explorer

yepyep, this is now working. Thanks!

0 Karma
Get Updates on the Splunk Community!

3 Ways to Make OpenTelemetry Even Better

My role as an Observability Specialist at Splunk provides me with the opportunity to work with customers of ...

What's New in Splunk Cloud Platform 9.2.2406?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.2.2406 with many ...

Enterprise Security Content Update (ESCU) | New Releases

In August, the Splunk Threat Research Team had 3 releases of new security content via the Enterprise Security ...