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
SplunkTrust
SplunkTrust

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
SplunkTrust
SplunkTrust

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!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...