Splunk Search

My tstats isn't returning results from the other datasets

ebs
Communicator

Hi,

I have several datasets that have the exact same format with only the source of the data differing. I've duplicated my macros from the dev environment to the test but I'm receiving no results for the test macro, despite when I do the tstats search as a datamodel instead I get results.

Here is the dev search: 
tstats summariesonly=true count("dev_metric.exchangeId") as avg_TPS from datamodel=metric by _time, dev_metric.date span=1s
| search "dev_metric.date"=$date$
| stats avg(avg_TPS) as averageTps by dev_metric.date
| eval averageTps=round(averageTps/1000,3)
| appendpipe [tstats count
| where count=0]
| fillnull value=0.000 averageTps
| fields averageTps

 

Here is the test search:
tstats summariesonly=true count("test_metric.exchangeId") as avg_TPS from datamodel=metric by _time, test_metric.date span=1s
| search "test_metric.date"=$date$
| stats avg(avg_TPS) as averageTps by metric.date
| eval averageTps=round(averageTps/1000,3)
| appendpipe [tstats count
| where count=0]
| fillnull value=0.000 averageTps
| fields averageTps

I've checked the dataset and there are the needed events in there, and I've done a | datamodel search equivalent to tstats that worked fine. What could be the reason I'm receiving no results? And what could be some steps to resolve this?

Labels (2)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Both searches look only at completed datamodel accelerations.  Are both data sets accelerated?  Are both accelerations completing successfully?

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

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...