Splunk Search

How to combine two timechart query that extract the difference ?

Maickeen
Engager

Query 1:

(index=iks) "Procces started" | timechart count span=1d

Query 2: 

(index=iks) "Procces finished" | timechart count span=1d

 

I want to display the result of Query 1 - Query 2 for each day

Labels (2)
0 Karma
1 Solution

somesoni2
Revered Legend

Try like this

(index=iks) "Procces started" OR "Procces finished" 
| eval type=if(searchmatch("Procces started"),"Process_Started","Process_Finished")
| timechart count span=1d by type
| eval differenc=Process_Started-Process_Finished

View solution in original post

somesoni2
Revered Legend

Try like this

(index=iks) "Procces started" OR "Procces finished" 
| eval type=if(searchmatch("Procces started"),"Process_Started","Process_Finished")
| timechart count span=1d by type
| eval differenc=Process_Started-Process_Finished
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...