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!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...