Splunk Dev

How to leverage the data from tstats query from a datamodel to stats command?

kaur_aman18
New Member

I am using C#SDK to search for | tstats count FROM datamodel=IIS_Data WHERE nodename=IIS_events IIS_events.cs_method='GET'.... but it is failing with "Error in 'tstats' command: This command is not supported in a real-time search".

If we replace tstats with stats and what else we need to make change?

Labels (1)
0 Karma

FrankVl
Ultra Champion

Not familiar with the C# SDK and not sure what exactly you want to achieve, but can you not just run it as a normal search instead of a realtime search? Doing realtime searches on an accelerated data model anyway doesn't make much sense.
See https://dev.splunk.com/view/csharp-sdk-pcl/SP-CAAAEYY for the differences and how to run them.

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...