Splunk Search

How to trim white spaces in events in search time

vikram1583
Explorer

Hi,

i have an event having white spaces in between i want to trim it
the data is coming from db connect i don't have access so i need o done it in search head

Can some one help me in fixing this

0 Karma

to4kawa
Ultra Champion
| foreach * [eval <<FIELD>> = trim('<<FIELD>>')]

all fields are trimed without _raw.

0 Karma
Get Updates on the Splunk Community!

Building Reliable Asset and Identity Frameworks in Splunk ES

 Accurate asset and identity resolution is the backbone of security operations. Without it, alerts are ...

Cloud Monitoring Console - Unlocking Greater Visibility in SVC Usage Reporting

For Splunk Cloud customers, understanding and optimizing Splunk Virtual Compute (SVC) usage and resource ...

Automatic Discovery Part 3: Practical Use Cases

If you’ve enabled Automatic Discovery in your install of the Splunk Distribution of the OpenTelemetry ...