Dashboards & Visualizations

How to calculate the age of the tickets ?

chitreshakumar
Communicator

I want to add a panel which will show the age of the tickets .
I have start time ,finish time and will take current time for those tickets whose finish time is null .So basically age is difference of finish and start time .How to apply this in Splunk?

0 Karma

p_gurav
Champion

Hi,

Try this:

| eval finishtime_new = case(isnull(finishtime), currenttime) | eval finishtime_epoch = (finishtime_new, "format_of_finishtime_new") | eval starttime_epoch = (starttime, "format_of_startime") | eval diff = finishtime_epoch - starttime_epoch

0 Karma

p_gurav
Champion

Hi chitreshakumar,

you can convert starttime and finishtime in epoch usingstrptime function using eval:
| eval finishtime_epoch = (finishtime, "") | eval starttime_epoch = (starttime, "") | eval diff = finishtime_epoch - starttime_epoch

0 Karma

chitreshakumar
Communicator

there is one condition if the finish time is not defined or null then this query will give wrong answer

0 Karma

p_gurav
Champion

You can make new field :

| eval finishtime_new = case(isnull(finishtime), currenttime)

0 Karma

mayurr98
Super Champion

give us sample format of starttime and finishtime

0 Karma

chitreshakumar
Communicator

its the date and time of the ticket generated

0 Karma
Get Updates on the Splunk Community!

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

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