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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

Splunk is officially part of Cisco

Revolutionizing how our customers build resilience across their entire digital footprint.   Splunk ...

Splunk APM & RUM | Planned Maintenance March 26 - March 28, 2024

There will be planned maintenance for Splunk APM and RUM between March 26, 2024 and March 28, 2024 as ...