Splunk Search

I am using subsearch and trying to pass ID from sub to the main and trying to calculate minimum of time by ID using tstats. My normal query is working fine.

payal23
Path Finder

Normal index query :

searchA[search search B|stats count by _time,BusinessIdentifier|return BusinessIdentifier]|stats min(_time) as E by BusinessIdentifier

Tstats query:

|tstats min(_time) as E from datamodel=A where nodename=B [|tstats dc(Fusion.BusinessIdentifier) as "Fusion" from datamodel=A where nodename=C by Fusion.BusinessIdentifier|return Fusion.BusinessIdentifier]|stats min(_time) as E by Fusion.BusinessIdentifier

0 Karma

lakshman239
Influencer

I assume both 'tstats' in your search works independently. Are you missing "search" and minor change ?

| tstats count from datamodel=A where nodename=B | search [|tstats dc(Fusion.BusinessIdentifier) as "Fusion" from datamodel=A where nodename=C by Fusion.BusinessIdentifier|return Fusion.BusinessIdentifier]|stats min(_time) as E by Fusion.BusinessIdentifier

0 Karma

payal23
Path Finder

It is passing only one BusinessIdentifier. If i put something like this:

| tstats count from datamodel=A where nodename=B | search [|tstats dc(Fusion.BusinessIdentifier) as "Fusion" from datamodel=A where nodename=C by Fusion.BusinessIdentifier|return 10000 Fusion.BusinessIdentifier]|stats count as E by Fusion.BusinessIdentifier

it is working.

But i want to pass all the identifiers..numbers should not limit.

I tried with limit=0 and also tried rename Fusion.BusinessIdentifier as search.
Both not working.

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