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!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...