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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...