Splunk Search

How to calculate elapsed time only on working hours ?

clementros
Path Finder

Hi all, 

I'm trying to calculate the time support team took to respond when a new ticket is created. 

For now i'm able to calculate the duration between a status new and other next status of the ticket with the command transaction : 

| transaction "Record Number" startswith="New" endswith=eval(NOT match(_raw,"New"))
| table "Record Number", "PI Event Time", duration

 

Next step is to calculate this duration only on working hours. For that i need to substract duration value with weekend or holidays duration if there are between the start and end date ? 

For holidays i know i should create a lookup table with holidays with the same date format. But i do not know how to do the substraction time only if no working date are between start and end duration

Can you help me please ?

Labels (1)
0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...