Splunk Enterprise

How to adjust the parser in Splunk to look for things without space or to cleanse the datastream before parsed?

rh71rdu
Explorer

Hi!

I have a stream of (Syslog) data coming from my Router via UDP into my workstation that is received and parsed by Splunk into fields, to identify (mostly) attempts to breach my router’s firewall by outside servers.

Unfortunately the syslog stream consistently omits a space or Tab between the MAC address ‘item‘ and the source ip ‘item‘ like this:

…OUT= MAC=00:00:00:00:00:00:8484:26:2b:9b:ea:bd:src=31.220.1.83…

which causes all SRC IP address field to remain unparsed.

If I could instruct Splunk to look instead for “:src=xx.xxx.xxx.xxx” or cleanse the data stream by converting all “:src=“ into “: src=“ (note the space) I think my Splunk Search will begin interpreting these ‘rogue’ Source IP fields and reveal some interesting attempts to access my network.

Does anyone know how to adjust the parser in Splunk to look for things without a space or to cleanse the datastream before it is parsed?

Thanks,

Rob

0 Karma

matt8679
Path Finder

Hi,

So you can easily change this at search time with a regex.

Try something like this:

Your main search |rex field=_raw "src\=(?<src>\d+\.\d+\.\d+\.\d+)"

 

 

0 Karma
Get Updates on the Splunk Community!

Accelerating Observability as Code with the Splunk AI Assistant

We’ve seen in previous posts what Observability as Code (OaC) is and how it’s now essential for managing ...

Integrating Splunk Search API and Quarto to Create Reproducible Investigation ...

 Splunk is More Than Just the Web Console For Digital Forensics and Incident Response (DFIR) practitioners, ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...