Getting Data In

Is it possible to use regular expressions and wildcard in the monitoring stanza of inputs.conf?

ankithreddy777
Contributor

In inputs.conf for monitor stanza, can we write regex?

If so,
/opt/splunk/cgate* matches (/opt/splunk/cgateee) or (/opt/splunk/cgateabd)

Can we use wildcards(*) for whitelist attribute?

0 Karma

ddrillic
Ultra Champion

The * wildcard is available. Explained nicely at Note concerning wildcards and monitor:

It says -

alt text

I usually check myself by running the monitor part in ls -

ls /opt/splunk/cgate*. If it returns the desired /opt/splunk/cgateee and/or /opt/splunk/cgateabd I know I'm fine.

0 Karma

C_HIEN
Path Finder

Sure, you can add regex to whitelist/blacklist in inputs.conf.

You can found the doc here: (http://docs.splunk.com/Documentation/Splunk/latest/Data/Whitelistorblacklistspecificincomingdata).

If you add whitelist = \.log$, Splunk will monitor only *.log files

0 Karma
Get Updates on the Splunk Community!

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 ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

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 ...