Splunk Search

Percent search

aalaa
Path Finder

Hello ,

I have a table, each line of this table has a specific value, I need a search command to calculate the percentage of each line on the sum of these values .

Any help please ?
Thanks

Tags (1)
0 Karma
1 Solution

harsmarvania57
Ultra Champion

Hi,

Please try below query, replace <fieldname> with actual fieldname.

<yourBaseSearch>
| eventstats sum(<fieldname>) as total
| eval percentage=(<fieldname>/total)*100

View solution in original post

harsmarvania57
Ultra Champion

Hi,

Please try below query, replace <fieldname> with actual fieldname.

<yourBaseSearch>
| eventstats sum(<fieldname>) as total
| eval percentage=(<fieldname>/total)*100

aalaa
Path Finder

it's work ! thanks

0 Karma
Get Updates on the Splunk Community!

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

(view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...

Adoption of Infrastructure Monitoring at Splunk

  Splunk's Growth Engineering team showcases one of their first Splunk product adoption-Splunk Infrastructure ...