Splunk Search

Extracting fields from logs

kandulasrinivas
New Member

I have a log file with below content

20120316.051652 Fr I perf Thread-9807784[10.xx.xx.x]/xxxxxx xxxxxxx xxxxxxx 725 100 787234600 2107768832

20120316.051652 Fr I perf Thread-9807750[10.xx.xx.x]/xxxxxxx xxxxxxx xxxxxxx 921 100 790443496 2107768832

How can i add the values that are present in 9 th column of line example in the above line
i want to add 725 + 921 and print the sum of it.

Tags (2)
0 Karma

Ayn
Legend
... | rex "^(?:\S+\s){7}(?<myfield>\d+)" | accum myfield AS myfield_sum
0 Karma
Get Updates on the Splunk Community!

What's New in Splunk Observability - October 2025

What’s New?  We’re excited to announce the latest enhancements to Splunk Observability Cloud and share what’s ...

🌟 From Audit Chaos to Clarity: Welcoming Audit Trail v2

&#x1f5e3; You Spoke, We Listened Audit Trail v2 wasn’t written in isolation—it was shaped by your voices. In ...

Splunk Enterprise Security 8.x: The Essential Upgrade for Threat Detection, ...

 Prepare to elevate your security operations with the powerful upgrade to Splunk Enterprise Security 8.x! This ...