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!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

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

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