Getting Data In

How to configure props.conf and transforms.conf to index logs with a specific string and filter out all other events?

chanduira
Explorer

Hi Experts,

I am getting logs / events from an application server to an indexer. I want to index logs with the string "connected to machine" and drop rest all events.

Please help me with props.conf and transforms.conf file syntax.

0 Karma

joesrepsolc
Communicator

Trying to implement this myself... struggling. Reading the link woodcock supplied now.

0 Karma

woodcock
Esteemed Legend

Look here:

http://docs.splunk.com/Documentation/Splunk/6.3.1/Forwarding/Routeandfilterdatad#Keep_specific_event...

In props.conf:

[YourSourceOrSourceTypeHere]
TRANSFORMS-set= setnull,setparsing

In transforms.conf:

[setnull]
REGEX = .
DEST_KEY = queue
FORMAT = nullQueue

[setparsing]
REGEX = connected\sto\smachine
DEST_KEY = queue
FORMAT = indexQueue

Deploy to Indexers and restart all splunk instances there. This will apply ONLY to events indexed after the restart.

0 Karma

chanduira
Explorer

Thanks for response.
I my case I have two index and different source. So I want to forward logs to index logs in specifix indexer.

I tried below option but all logs get filtered.

[setnull]
REGEX = .
DEST_KEY = queue
FORMAT = nullQueue
[setparsing]
REGEX = connected\sto\smachine
DEST_KEY = queue
FORMAT = myindexname
0 Karma

woodcock
Esteemed Legend

It does not work that way. You set the destination index ( myindexname ) in inputs.conf. You must use FORMAT = indexQueue to pull it back out of the nullQueue.

0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

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