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!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...