Splunk Search

How to append two columns from different data inputs based on time

pahujadeep
Explorer

I have data in below format 

Data Input 1 :  index=abc

Time (YYYY-MM-DD HH24)Count1
2020-09-30 0010
2020-09-30 0120
2020-09-30 02 40

 

Data Input 2 : index=xyz

Time (YYYY-MM-DD HH24)Count2
2020-09-30 0030
2020-09-30 0110
2020-09-30 02 25

 

I am looking for output like this :

Time (YYYY-MM-DD HH24)Count1Count2
2020-09-30 001030
2020-09-30 012010
2020-09-30 024025

 

And create a timechart out of this for both values

Labels (2)
0 Karma
1 Solution

ITWhisperer
SplunkTrust
SplunkTrust
index=abc OR index=xyz
| stats values(Count1) as Count1 values(Count2) as Count2 by _time

View solution in original post

ITWhisperer
SplunkTrust
SplunkTrust
index=abc OR index=xyz
| stats values(Count1) as Count1 values(Count2) as Count2 by _time
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

Data Management Digest – May 2026

Welcome to the May 2026 edition of Data Management Digest!   As your trusted partner in data innovation, the ...