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
Get Updates on the Splunk Community!

Developer Spotlight with Paul Stout

Welcome to our very first developer spotlight release series where we'll feature some awesome Splunk ...

State of Splunk Careers 2024: Maximizing Career Outcomes and the Continued Value of ...

For the past four years, Splunk has partnered with Enterprise Strategy Group to conduct a survey that gauges ...

Data-Driven Success: Splunk & Financial Services

Splunk streamlines the process of extracting insights from large volumes of data. In this fast-paced world, ...