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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...