Dashboards & Visualizations

I have a table that has batch ID, start & end time of each batch. How can I get the duration i.e. runtime of each batch.

cadrija
Path Finder

I have a table that has batch ID, start & end time of each batch. How can I get the duration i.e. runtime of each batch.

cadrija_1-1639393554716.png

 

When I am running this query then the duration field is coming blank.

index="bodata" | where BEX_TSP_START!="NULL" AND BEX_TSP_END!="NULL" | where BEX_DTE_BSNS=="09-12-2021" | eval Duration=strptime(BEX_TSP_END,"%H:%M.%S")-strptime(BEX_TSP_START,"%H:%M.%S") | table BEX_NUM_JOB,Duration

Please help.

 

Labels (1)
0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

The "times" in your image do not contain hours which is why the strptime is failing. Do your events have the full date and time in some other field that you could use?

0 Karma

cadrija
Path Finder

@ITWhisperer Okay, got it let me check how to get the full date time.
Thank you.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...