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!

Introducing the Splunk Community Dashboard Challenge!

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

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

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