Splunk Search

tstats by index by month Error in 'TsidxStats': WHERE clause is not an exact query

daymar23
Observer

Hello Community! 

I am trying to get the record count by index that I am getting per month in Splunk. I am using this search with tstats, because there are millions of records per month and from I read this is more efficient than the stats command.  

 

| tstats count WHERE (index=*) BY index _time span=1mon
| timechart span=1mon count

 

But I don't know why I am receiving this error: 

 

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

 

Can anyone help me to know what I am doing wrong? 

Thanks 

 

 

Labels (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

That query works fine on 8.1.  What version are you using?  Have you tried without the parentheses?

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

daymar23
Observer

I have Version:7.2.1 😞 

Yes I have already tried without parentheses.

Do you know how I can do it in this version? 

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Sorry, I don't know.  Perhaps upgrading to 7.3.x will help (7.2 is not supported now).

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

allenclarke
New Member

I get the same issue.  Can't get any searches with tstats to run, they all error in the same way. 

 

Running Splunk 8.2

Tags (1)
0 Karma
Get Updates on the Splunk Community!

Splunk Enterprise Security(ES) 7.3 is approaching the end of support. Get ready for ...

Hi friends!    At Splunk, your product success is our top priority. With Enterprise Security (ES), we're here ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

Watch On Demand the Tech Talk, and empower your SOC to reach new heights! Duration: 1 hour  Prepare to ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...