Getting Data In

Using span option in timechart doesn't show any values

4uramana4u
Explorer

I am trying to get a time difference of two events and using timechart, I wants to display MAX(time difference value ) in a span of 30seconds;  Below query is working with table and I want to use timechart - Any help appreciated. 

index=express_its_pds_solsup_dce sourcetype="express:dce:shipmentlog" "EWPX - WCO: Begin saving"
| rex field=_raw "build.(?<SHIP_FILE>[\S+]*)"
| stats latest(_time) as begin_time by SHIP_FILE
| join SHIP_FILE
[ search index=express_its_pds_solsup_dce sourcetype="express:dce:shipmentlog" "EWPX - WCO: End"
| rex field=_raw "build.(?<SHIP_FILE>[\S+]*)"
| stats latest(_time) as end_time by SHIP_FILE ] | eval ship_throughput = end_time-begin_time

| table SHIP_FILE, ship_throughput

Labels (1)
0 Karma

thambisetty
SplunkTrust
SplunkTrust

@4uramana4u 

streamstats is the best option to find out difference between two events. Below is the sample working query. you can tailor it as per your needs.

index=_internal sourcetype=splunkd host="samplehost" component=StatusMgr 
| bin _time span=30s 
| stats count by  _time source
| streamstats range(_time) as delta window=2 global=f by source
| eventstats max(delta) as max_delta
————————————
If this helps, give a like below.

4uramana4u
Explorer

Thank you, solved.

Tags (1)
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...

Introduction to Splunk AI

How are you using AI in Splunk? Whether you see AI as a threat or opportunity, AI is here to stay. Lucky for ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...