Splunk Search

How to remove part of a field value?

chadman
Path Finder

I have a search that gives me a bunch of fields that look like:
REBOOT=4/5/2016 9:17:19 AM
REBOOT=4/5/2016 9:12:02 AM
REBOOT=4/5/2016 8:58:28 AM

How can I remove the REBOOT= and keep the date/time with my search

0 Karma
1 Solution

somesoni2
Revered Legend

If the "REBOOT=4/5/2016 9:17:19 AM" appear as a value for a field, you can do like htis

your base search | replace "REBOOT=*" with * in yourfieldname(s)

If this appears in the raw data, try like this

your base search | rex mode=sed "s/REBOOT=//g"

View solution in original post

somesoni2
Revered Legend

If the "REBOOT=4/5/2016 9:17:19 AM" appear as a value for a field, you can do like htis

your base search | replace "REBOOT=*" with * in yourfieldname(s)

If this appears in the raw data, try like this

your base search | rex mode=sed "s/REBOOT=//g"

chadman
Path Finder

Thanks, that's what I was looking for.

Chad

0 Karma
Get Updates on the Splunk Community!

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

🔐 Trust at Every Hop: How mTLS in Splunk Enterprise 10.0 Makes Security Simpler

From Idea to Implementation: Why Splunk Built mTLS into Splunk Enterprise 10.0  mTLS wasn’t just a checkbox ...