Splunk Search

Filter syntax options in serverclass.conf

Peter
Path Finder

Is it possible to use regular expressions for the whitelist/blacklist filters in serverclass.conf? For example:

whitelist.0=mail[0-9]+.*

Tags (1)
1 Solution

gkanapathy
Splunk Employee
Splunk Employee

It is not possible currently (version 4.0). Only * as a wildcard for any character can be used.

View solution in original post

0 Karma

gkanapathy
Splunk Employee
Splunk Employee

It is not possible currently (version 4.0). Only * as a wildcard for any character can be used.

0 Karma

Jason
Motivator

If regex in these whitelists are anything like the regexp in stanza names, there was a bug in the docs. . means dot, * means anything but slash (meaning filenames only) and ... (three dots) means anything, your usual regex .*

0 Karma

Peter
Path Finder

I see that PCRE expressions have been added as of 4.1, but the mappings confuse me. My current serverclass.conf has name8., which mean to match name8.blah and name8.bleh. It would be easier for me to match name[0-9]+.., but the docs seem to indicate that '.' is converted to '.' and '' is converted to '.' Can you add clarity to this?

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...