Splunk Enterprise Security

Help with a query

havatz
Explorer

Hi All 

I have this query

index=checkpoint sourcetype=opsec:anti_virus OR sourcetype=opsec:anti_malware Protection_Name=* NOT action=blocked NOT te_action=block | stats count dc(Protection_Name),values(Protection_Type),values(Destination_DNS_Hostname),values(te_action),values(malware_action),values(file_name),values(file_md5),values(dest),values(Protection_Name) by src | `map_notable_fields` | rename values(Protection_Type) as \"Protection_Type\",values(Destination_DNS_Hostname) as \"Name_Resolved\",values(te_action) as Action,values(malware_action) as \"Malicious_Intent\",values(file_name) as \"File_Name\",values(file_md5) as \"File_Hash\",values(dest) as Dest,src as Source,values(Protection_Name) as \"Protection_Names\",dc(Protection_Name) as \"Infection_Count\"| where Infection_Count>1 | table \"Infection_Count\",Source,\"Protection_Names\",\"Protection_Type\",Dest,\"Name_Resolved\",\"File_Name\",\"File_Hash\",\"Malicious_Intent\",Action"

 

how can i know how much notable events i will get historical by hour?

 I mean not a query over the last 2 hours, but a query every 2 hours for the last month. In other words, if they run the rule every 2 hours, how many notables per day should they expect?

 

I tried to do that but its not working:

|gentimes start=-20 end=0 increment=1d | map maxsearches=90 index=checkpoint sourcetype=opsec:anti_virus OR sourcetype=opsec:anti_malware Protection_Name=* NOT action=blocked NOT te_action=block | stats count dc(Protection_Name),values(Protection_Type),values(Destination_DNS_Hostname),values(te_action),values(malware_action),values(file_name),values(file_md5),values(dest),values(Protection_Name) by src | `map_notable_fields` | rename values(Protection_Type) as \"Protection_Type\",values(Destination_DNS_Hostname) as \"Name_Resolved\",values(te_action) as Action,values(malware_action) as \"Malicious_Intent\",values(file_name) as \"File_Name\",values(file_md5) as \"File_Hash\",values(dest) as Dest,src as Source,values(Protection_Name) as \"Protection_Names\",dc(Protection_Name) as \"Infection_Count\"| where Infection_Count>1 | table \"Infection_Count\",Source,\"Protection_Names\",\"Protection_Type\",Dest,\"Name_Resolved\",\"File_Name\",\"File_Hash\",\"Malicious_Intent\",Action

 

What can I do?

 

Thanks

Labels (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

It's impossible to estimate how many notable events any search will produce without knowing the data being searched.  In this example, the number of notable events to expect is roughly equal to the number of malware events reported by CheckPoint.

The test query is failing in part because the gentimes command does not generate the fields expected by the search.  It is also failing because the map command does not include the search option.

---
If this reply helps you, Karma would be appreciated.
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

What Is the Name of the USB Key Inserted by Bob Smith? (BOTS Hint, Not the Answer)

Hello Splunkers,   So you searched, “what is the name of the usb key inserted by bob smith?”  Not gonna lie… ...

Automating Threat Operations and Threat Hunting with Recorded Future

    Automating Threat Operations and Threat Hunting with Recorded Future June 29, 2026 | Register   Is your ...