Splunk Search

How to overlay a flat line over a time series, spanning the same duration as the time series?

mlampell
Explorer

I'm graphing the voice quality of a phone call over its duration. The voice quality is computed in real-time every t seconds. This is resulting in a wavy line graph. At the end of the call, I am able to compute the average voice quality achieved throughout the call. I want to go back and overlay a flat line, with this value, over the wavy line graph.

Right now I'm using "transaction" to combine all the measurements from the same call, and then using "streamstats" to calculate the average voice quality. However, transaction is defined in time by its starting time, so when I go to plot the average voice quality, it shows up as a single point, plotted near the beginning of the phone call. I would like it to extend the full length of the phone call.

Any help appreciated!

Tags (1)

martin_mueller
SplunkTrust
SplunkTrust

You could do something like this:

base search yielding a call with a field quality | eventstats avg(quality) as avg_quality | timechart avg(quality) as current_quality first(avg_quality) as avg_quality

That drawn as a line chart should give you the current quality per time bucket as a potentially wavy line and the overall average as a straight.

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Ah, to chart multiple calls individually you can add by callId or whatever field you have to the eventstats and timechart.

0 Karma

mlampell
Explorer

Thank you very much for your response! It came very close to solving my problem, but not totally. Unfortunately, when there is more than one call in the time interval displayed, all the calls show up with the same average. I need to be able to display the average quality for each call, that's why I thought I might need to use "transaction". Any other ideas?

I tried posting a screenshot, but currently don't have enough karma 😞

Thanks!

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...