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!

Dashboards: Hiding charts while search is being executed and other uses for tokens

There are a couple of features of SimpleXML / Classic dashboards that can be used to enhance the user ...

Splunk Observability Cloud's AI Assistant in Action Series: Explaining Metrics and ...

This is the fourth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how ...

Brains, Bytes, and Boston: Learn from the Best at .conf25

When you think of Boston, you might picture colonial charm, world-class universities, or even the crack of a ...