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!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

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 ...