Splunk Search

How can I speed up a search by creating a data model using tstats?

pil321
Communicator

I want to speed up a search by creating a data model and using tstats.

This is the search using the data model so far:

| tstats count from datamodel=WinEvents.Summary by _time, host, Summary.EventCode, Summary.SourceName, Summary.Type, Summary.Keywords span=1m | stats earliest(_time) as First latest(_time) as Last count by host, Summary.EventCode, Summary.SourceName,  Summary.Type

On the original search, I used eval:

...| eval Type=if(Keywords=="Audit Success", Keywords, Type) | eval Type=if(Keywords=="Audit Failure", Keywords, Type)

Since that is a complex aggregate function (according to the documentation), how do I make that work with tstats?

0 Karma
Get Updates on the Splunk Community!

Uncovering Multi-Account Fraud with Splunk Banking Analytics

Last month, I met with a Senior Fraud Analyst at a nationally recognized bank to discuss their recent success ...

Secure Your Future: A Deep Dive into the Compliance and Security Enhancements for the ...

What has been announced?  In the blog, “Preparing your Splunk Environment for OpensSSL3,”we announced the ...

New This Month in Splunk Observability Cloud - Synthetic Monitoring updates, UI ...

This month, we’re delivering several platform, infrastructure, application and digital experience monitoring ...