Splunk Search

undefined

romanpro
Explorer

 

Labels (3)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

This query appears to be unsuitable for conversion to  tstats.  It uses too many fields that must all be indexed for tstats to supply them.  Also, the query is doing its own analysis of the events, but tstats provides aggregated values, not events, which would break the calculations done in the query.

What problem are you trying to solve?  Perhaps tstats is not part of the answer.

---
If this reply helps you, Karma would be appreciated.

romanpro
Explorer

I already converted up to this part 

| tstats count from datamodel=Cisco_Security.Secure_Malware_Analytics_Dataset where nodename=Secure_Malware_Analytics_Dataset index=* status IN ("*") sourcetype="cisco:sma:submissions"

It works as expected but I stuck to complete now

0 Karma

richgalloway
SplunkTrust
SplunkTrust

I'm sure you are stuck, as expected.

The current tstats command produces only one field: count.  You can get some (and maybe all) of them using the list or values function, but any association between the fields will be lost.

For example,.

| tstats count, values(analysis.threat_score) as ats, values(analysis.metadata.sandcastle_env.analysis_start) as start, ... from datamodel=Cisco_Security.Secure_Malware_Analytics_Dataset where nodename=Secure_Malware_Analytics_Dataset index=* status IN ("*") sourcetype="cisco:sma:submissions"

 

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Purpose in Action: How Splunk Is Helping Power an Inclusive Future for All

At Cisco, purpose isn’t a tagline—it’s a commitment. Cisco’s FY25 Purpose Report outlines how the company is ...

[Upcoming Webinar] Demo Day: Transforming IT Operations with Splunk

Join us for a live Demo Day at the Cisco Store on January 21st 10:00am - 11:00am PST In the fast-paced world ...

New Year. New Skills. New Course Releases from Splunk Education

A new year often inspires reflection—and reinvention. Whether your goals include strengthening your security ...