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!

[Puzzles] Solve, Learn, Repeat: Dynamic formatting from XML events

This challenge was first posted on Slack #puzzles channelFor a previous puzzle, I needed a set of fixed-length ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Stronger Security with Federated Search for S3, GCP SQL & Australian Threat ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...