Splunk Search

regex wimp

chowell
Explorer

I have this in a transforms.conf file on one of my forwarders. My goal is to drop everything from either of the IP's, but they keep coming through. What am I doing wrong?

[setnull]
REGEX = .*(10\.3\.0\.(11|12)).*
DEST_KEY = queue
FORMAT = nullQueue

[setparsing]
REGEX = .
DEST_KEY = queue
FORMAT = indexQueue

THanks,

--Carl

Tags (1)

landen99
Motivator

My bet is that your ip exists in the host field and not in the _raw text.

[setnull]
REGEX = 10\.3\.0\.1[12]
SOURCE_KEY=MetaData:Host
DEST_KEY = queue
FORMAT = nullQueue
0 Karma

ftk
Motivator

You don't have to include your wildcards in the front and back. Give it a try as follows:

[setnull]
REGEX = 10\.3\.0\.(11|12)
DEST_KEY = queue
FORMAT = nullQueue

Also make sure that you are actually applying this routing rule to your applicable sourcetype in props.conf....e.g.

[mysourcetype]
TRANSFORMS-setnull = setnull
Get Updates on the Splunk Community!

Enterprise Security Content Update (ESCU) | New Releases

In December, the Splunk Threat Research Team had 1 release of new security content via the Enterprise Security ...

Why am I not seeing the finding in Splunk Enterprise Security Analyst Queue?

(This is the first of a series of 2 blogs). Splunk Enterprise Security is a fantastic tool that offers robust ...

Index This | What are the 12 Days of Splunk-mas?

December 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...