Deployment Architecture

serverclass.conf blacklisting and white listing

parmenion_natha
Explorer

I have multiple severs that have been blacklisted

blacklist.0 = nonprod*

 

I am trying to blacklist all except for nonprod08

How can I do this?

tia

Labels (2)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Blacklist is not the best way to do that.  Try whitelist=nonprod08.

---
If this reply helps you, an upvote would be appreciated.
0 Karma

parmenion_natha
Explorer

hi @richgalloway 

thanks,

The issue is that I need to blacklist nonprod servers as forwarders are added on all nonprod servers to replicate prod environments and if I remove the blacklist apps will be deployed to all nonprod servers.

I was hoping for a quick solution to only allow nonprod08 while blacklisting the rest

Kind regards

0 Karma

richgalloway
SplunkTrust
SplunkTrust

If you have filterType=whitelist (the default) then all servers are blocked except those covered by a whiltelist entry.  That's why I suggested whitelist=noprod08 to allow nonprod08 while blocking the rest.

You may be able to test this using the Preview feature in the Forwarder Management screen.

---
If this reply helps you, an upvote would be appreciated.
0 Karma

parmenion_natha
Explorer

@richgalloway 

there are way to many servers that would need to be whitelisted (all windows servers etc). I currently whitelist all and blacklist nonprod* and a few others.

I am kind of looking for something like regex to blacklist 1-7 then 9-126 etc allowing 8 still to forward

Not sure if I can though

 

thanks

0 Karma

richgalloway
SplunkTrust
SplunkTrust

This would have been good information to include in the original question.

Consider changing filterType to blacklist so everything is allowed except those which are blacklisted.

If that still doesn't meet your needs then you'll need to get creative with the regexes used in the black or white lists.

---
If this reply helps you, an upvote would be appreciated.
0 Karma
.conf21 CFS Extended through 5/20!

Don't miss your chance
to share your Splunk
wisdom in-person or
virtually at .conf21!

Call for Speakers has
been extended through
Thursday, 5/20!