Splunk Cloud Platform

How to write one more tstats query in tsatas where clause?

manikanthkoti
Loves-to-Learn Everything

Hi Everyone,

I am looking for writing tstats sub search in query in tstats where claus.

I tried the below way but my query giving No Result. I want write in sub search with tstats from two indexes.

Query:

 

| tstats latest(_time),values(relational_correlationId),values(tracePoint),values(timestamp),values(businessKey),values(businessValue)  where [  tstats latest(_time) as _time ,values(relational_correlationId) as relational_correlationId ,values(tracePoint) as tracePoint,values(timestamp) as timestamp,values(content.businessFields{}.key) as businessKey,values(content.businessFields{}.value) as businessValue where index="mulesoft_index" earliest=-10m@m latest=now() by environment,businessGroup,appName,interfaceName,correlationId]

 

Please help me.

Thanks & Reagards,

Manikanth

 

 

Labels (2)
Tags (2)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Recall that the results of a subsearch become part of the main search so those results must make sense in the context of the main search.  To check that, run the subsearch by itself with the format command so you can see what gets returned to the main search.

| tstats latest(_time) as _time ,values(relational_correlationId) as relational_correlationId ,values(tracePoint) as tracePoint,values(timestamp) as timestamp,values(content.businessFields{}.key) as businessKey,values(content.businessFields{}.value) as businessValue where index="mulesoft_index" earliest=-10m@m latest=now() by environment,businessGroup,appName,interfaceName,correlationId | format
---
If this reply helps you, Karma would be appreciated.
0 Karma

manikanthkoti
Loves-to-Learn Everything

Hi 

 

Tags (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust
What about it is not working? What results do you get vs what you expect?
If you want the subsearch to get data from a summary index then modify the subsearch to get the data from the SI.
---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

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

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...