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!

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...