Splunk Search

TSTATS where error

jwalzerpitt
Influencer

I am trying to run the following tstats search:

| tstats summariesonly=true estdc(Malware_Attacks.dest) as "infected_hosts" where "Malware_Attacks.action=allowed" from datamodel="Malware"."Malware_Attacks" 
| where 'infected_hosts'>100 
| eval const_dedup_id="const_dedup_id"

but I get the error:

Error in 'TsidxStats': WHERE clause is not an exact query

Any help would be appreciated

Thx

0 Karma
1 Solution

nickhills
Ultra Champion

it's "from where", as opposed to "where from"
Thus:
| tstats summariesonly=true estdc(Malware_Attacks.dest) as "infected_hosts" from datamodel="Malware"."Malware_Attacks" where "Malware_Attacks.action"=allowed

If my comment helps, please give it a thumbs up!

View solution in original post

nickhills
Ultra Champion

it's "from where", as opposed to "where from"
Thus:
| tstats summariesonly=true estdc(Malware_Attacks.dest) as "infected_hosts" from datamodel="Malware"."Malware_Attacks" where "Malware_Attacks.action"=allowed

If my comment helps, please give it a thumbs up!

jwalzerpitt
Influencer

That was it - TYVM

0 Karma

nickhills
Ultra Champion

If my answer helped, please consider accepting and/or upvoting so that other memebers of the community can see it was useful.

If my comment helps, please give it a thumbs up!
0 Karma

lakshman239
SplunkTrust
SplunkTrust

Pls change to | tstats summariesonly=true estdc(Malware_Attacks.dest) as "infected_hosts" from datamodel="Malware"."Malware_Attacks" where "Malware_Attacks.action=allowed groupby Malware_Attacks.src

OsmanElyas
Explorer

| tstats summariesonly=true sum(log.bytes) as MBytes_transferred from datamodel="ftnt_fos" where nodename="log.traffic" $srcip$ $dstip$ $user$ $app$ $vdom$ $device$ $srcintf$ $dstintf$ groupby log.user | eval MBytes_transferred = (MBytes_transferred/(1024*1024)) | sort -MBytes_transferred | head 10

0 Karma
Get Updates on the Splunk Community!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...