Splunk Search

splunk

vinod0313
Explorer

I have two queries and i want to append those two queries and i need new column for separation
for ex:
i got below result from query 1

total     avg       max
10          15         16


and i got below result from query 2
total     avg       max
51          50        19


i want to append both queries and I want result like below

Name       total   avg    max
first           10         15       16
second     51         50        19

 

 

 

So I want new column with "Name"

could anyone please help on this??

Labels (1)
0 Karma

saravanan90
Contributor

append command may help..  Query1 | eval Name="first"  | append [|search query2| eval Name="second"] 

index=_internal | stats avg(kbps) as avg, max(kbps) as max,sum(kbps) as total | eval Name="_internal"| append [search index=_audit| stats avg(kbps) as avg, max(kbps) as max,sum(kbps) as total | eval Name="_audit"] | table Name avg max total

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