Splunk Search

What is the easiest way to get the percentage increase difference between two median values?

jundai
Explorer

This works wonderfully to give me the count and median per server farm, per URL:

index=wtf earliest=10/13/2014:10:00:00 latest=10/13/2014:11:00:00 | chart count, exactperc50(time_taken) as median over base_uri by farm

If I have two farms (say, canary and non-canary), how do I go about getting the % increase in the median for the canary servers?

bmunson_splunk
Splunk Employee
Splunk Employee

You need to use eventstats to create a value available to both farm events as follows

index=wtf earliest=10/13/2014:10:00:00 latest=10/13/2014:11:00:00 | chart count, exactperc50(time_taken) as median over base_uri by farm | eventsats min(median) as min | eval "% Diference" = (median/min-1)*100 | fields - min

This will show for all farms what percentage they are better than the worst.

0 Karma

somesoni2
Revered Legend

If the value for the field farm is static , which are "canary" and "non-canary" then you can add following eval to get the percentage change.

index=wtf earliest=10/13/2014:10:00:00 latest=10/13/2014:11:00:00 | chart count, exactperc50(time_taken) as median over base_uri by farm | eval "% difference:=round((canary-'non-canary')*100/'non-canary',2)

Let me know if they are non-static

0 Karma

hbakker
Engager

What if you wanted a chart that had multple comparisons, example: %difference Median and %difference TP95?

0 Karma

somesoni2
Revered Legend

You want to compare % increase in median between two farms?

0 Karma

jundai
Explorer

Yep. Let's say the time_taken median on non-canary is 500 ms, and time_taken median on canary is 600 ms. I'd like to have a column showing the % increase (difference), which in this case would be 20%.

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

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