Getting Data In

filtering on host

a212830
Champion

I've setup a heavy forwarder so that some feeds are going to one set of indexers, and another feed is going to a different set of indexers. I also setup a filter, so that only certain events are indexed (the rest are discarded). Now, I want to filter specifically on hosts that match a regex. How do I do that? It appears that the regex in transforms.conf works on the entire event, not just the host. Is there a way to do this?

0 Karma

jeff
Contributor

When you say you want to "filter", you are implying you want to take action (change indexer, drop data) based on the regex of the host? You would do this by specifying the host-matching pattern for the host in props.conf, which is regex-based (with the exception of ..., ., and *).

props.conf

[host::(my.+[1-6])|(otherhost[0-9]{0,})]
TRANSFORMS-drop = drop_event

transforms.conf

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

a212830
Champion

Essentially, I want a whitelist. OK. I think that I get it. I'll give it a whirl...

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...