Splunk Search

How to display two queries output as single output.

thomas6m
New Member

Hi Team,
How to display two queries output as single output. Please help.
index = * sourcetype=test earliest=@d latest=now | eventstats count as INSTANCES| dedup Microservices | eventstats count as APP | dedup Space | eventstats count as SPACE | dedup Org | eventstats count as ORG | table ORG SPACE APP INSTANCES | head 1

index = * sourcetype=test earliest=@d latest=now |table Instance_state | rename Instance_state as status | stats count(eval(status="running")) AS Running, count(eval(status="down")) AS Down,count(eval(status="crashed")) AS Crashed

Expected Output
ORG SPACE APP INSTANCES Running Down Crashed
3 37 386 820 627 103 90

Tags (2)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust
index = * sourcetype=test earliest=@d latest=now 
| rename Instance_state as status 
| stats count(eval(status="running")) AS Running, count(eval(status="down")) AS Down,count(eval(status="crashed")) AS Crashed,
count as INSTANCES, dc(Microservices) as APP, dc(Space) as SPACE, dc(Org) as ORG
| table ORG SPACE APP INSTANCES Running Down Crashed
---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust
index = * sourcetype=test earliest=@d latest=now 
| rename Instance_state as status 
| stats count(eval(status="running")) AS Running, count(eval(status="down")) AS Down,count(eval(status="crashed")) AS Crashed,
count as INSTANCES, dc(Microservices) as APP, dc(Space) as SPACE, dc(Org) as ORG
| table ORG SPACE APP INSTANCES Running Down Crashed
---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...

Cultivate Your Career Growth with Fresh Splunk Training

Growth doesn’t just happen—it’s nurtured. Like tending a garden, developing your Splunk skills takes the right ...

Introducing a Smarter Way to Discover Apps on Splunkbase

We’re excited to announce the launch of a foundational enhancement to Splunkbase: App Tiering.  Because we’ve ...