Splunk Search

How to extract event raw size just like linecount

tpflicke
Path Finder

I frequently use the length of the raw data - more often than readily extracted fields punctuation and linecount

I do so be extracting the field in the query like

... | eval raw_length=len(_raw) | ...

What are the options to do this as a predefined field extraction at either search time or even index time?

Tags (2)
1 Solution

dwaddle
SplunkTrust
SplunkTrust

You can do this with a 'calculated field' which is really just an eval command stuff into a config file. Stuff this into $SPLUNK_HOME/etc/system/local/props.conf:

[default]
EVAL-raw_length = len(_raw)

View solution in original post

dwaddle
SplunkTrust
SplunkTrust

You can do this with a 'calculated field' which is really just an eval command stuff into a config file. Stuff this into $SPLUNK_HOME/etc/system/local/props.conf:

[default]
EVAL-raw_length = len(_raw)

tpflicke
Path Finder

Thanks, exactly what I need.

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

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

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...