Splunk Search

CDR - Calculate number of Active Calls at any give time

hemantbhatta
Explorer

Hi, I am trying to calculate the number of Active Calls at any 'given time' from Call Detail Records (CDR). CDRs store the 'callConnect' and 'callDisconnect' time in a single CDR event. Logically speaking at any 'given time' the number of active calls = number of CDR events that have 'callDisconnect' > 'given time' (while evaluating all the CDR call records older than 'given time'). How can we implement this as Splunk search Querry? Any ideas. Thanks. HB.

Tags (1)
0 Karma
1 Solution

gkanapathy
Splunk Employee
Splunk Employee

You can use the concurrency command, and let's assume that callConnect is set as the Splunk event timestamp, i.e., _time:

sourcetype=mycdrs | eval dur = callDisconnect-_time | concurrency duration=dur

Depending on the format, you may have to apply the strptime() function to convert callDisconnect to epoch time (_time will already be in epoch time), but the above is pretty much it.

View solution in original post

gkanapathy
Splunk Employee
Splunk Employee

You can use the concurrency command, and let's assume that callConnect is set as the Splunk event timestamp, i.e., _time:

sourcetype=mycdrs | eval dur = callDisconnect-_time | concurrency duration=dur

Depending on the format, you may have to apply the strptime() function to convert callDisconnect to epoch time (_time will already be in epoch time), but the above is pretty much it.

hemantbhatta
Explorer

Thanks. Looks like it did the trick!!

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