Splunk Search

Removing all numbers from _raw message

cpeteman
Contributor

I want regex to remove all numbers from _raw message. Right now I have the search

* |rex mode=sed "s/ \d{1,}//g" |table _raw

i.e.

Aug 14 20:34:01 hype56 kernel: ib0: join failed for ff12:401b:ffff:0000:0000:0000:ffff:ffff, status -22

becomes

Aug:34:01 hype56 kernel: ib0: join failed for ff12:401b:ffff:0000:0000:0000:ffff:ffff, status -

but I want it to be

Aug:: hype kernel: ib: join failed for ff:b:ffff::::ffff:ffff, status -
Tags (2)
0 Karma
1 Solution

cpeteman
Contributor

Well looks like the right answer was already sitting in front of me

  * |rex mode=sed "s/\d{1,}//g" |table _raw

Darn white space 😉

Note: One could also replace \d{1,} with \d+

View solution in original post

0 Karma

cpeteman
Contributor

Well looks like the right answer was already sitting in front of me

  * |rex mode=sed "s/\d{1,}//g" |table _raw

Darn white space 😉

Note: One could also replace \d{1,} with \d+

0 Karma
Get Updates on the Splunk Community!

Database Performance Sidebar Panel Now on APM Database Query Performance & Service ...

We’ve streamlined the troubleshooting experience for database-related service issues by adding a database ...

IM Landing Page Filter - Now Available

We’ve added the capability for you to filter across the summary details on the main Infrastructure Monitoring ...

Dynamic Links from Alerts to IM Navigators - New in Observability Cloud

Splunk continues to improve the troubleshooting experience in Observability Cloud with this latest enhancement ...