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
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

🔐 Trust at Every Hop: How mTLS in Splunk Enterprise 10.0 Makes Security Simpler

From Idea to Implementation: Why Splunk Built mTLS into Splunk Enterprise 10.0  mTLS wasn’t just a checkbox ...