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!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...

Updated Data Management and AWS GDI Inventory in Splunk Observability

We’re making some changes to Data Management and Infrastructure Inventory for AWS. The Data Management page, ...