Splunk Search

get percentage of specific field over volume

pratik151
New Member

I have two query

1: sourcetype=A error=499
2: sourcetype=B X=*

I would like to make timechart of % of A on B.

Basically I want to make timechart that will tell if error code increase is because of volume decrease etc,

0 Karma

to4kawa
Ultra Champion
( sourcetype=A error=499) OR (sourcetype=B X=*)
| timechart count by sourcetype
| eval perc= round(A / B * 100,2)
| fillnull
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 ...