Splunk Enterprise Security

need spl into datamodel search

AL3Z
Builder

Hi,
Need below search into a web datmodel search 
index=es_web action=blocked host= * sourcetype= *
| stats count by category
| sort 5 -count

thanks

Labels (1)
0 Karma

fredclown
Builder

I think this should work. You shouldn't need to include the host=* or sourcetype=* as every event has a host and sourcetype.

|tstats count from datamodel={your data model} where index="es_web" AND {your data model}.action="blocked" by {your data model}.category
|sort 5 -count
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...

What’s New in Splunk Observability – September 2025

What's NewWe are excited to announce the latest enhancements to Splunk Observability, designed to help ITOps ...

Fun with Regular Expression - multiples of nine

Fun with Regular Expression - multiples of nineThis challenge was first posted on Slack #regex channel ...