Getting Data In

serverclass.conf whitelist from pathname not working

justincoon
New Member

Hello,

I've got a 100% Windows environment with a deployment server and I'm trying to configure server classes so we can automatically distribute config to servers based on their environment/roles. Using just name regex matches (whitelist.0 = regex) isn't going to work well with how random the names are, so I'd like to use "whitelist.from_pathname" instead with a csv or text file fed from one of my automation servers, but I just can't get it to work or the UI is lying to me.

I tried csv files first, two columns (ComputerName,EnvironmentName), using select_field, where_field and where_equals to filter by EnvironmentName and that didn't seem to work. Then I tried just a plain text file list (one server name per line) and that didn't work. I thought maybe it didn't like absolute paths (D:\) so I tried a relative path "etc\deployment-apps\DevServerList.txt" and that didn't work either. So I tried forward slashes. I've been restarting splunkd in between edits.

This is basically what the CSV stanza looked like:

[serverClass:DevelopmentServers]
whitelist.select_field = ComputerName
whitelist.from_pathname = D:\Automation\ServerEnvironmentList.csv
whitelist.where_field = EnvironmentName
whitelist.where_equals = Development*

When I inspect clients in Forwarder Management > Clients they're all showing nothing for Server Classes, but the moment I switch the serverClass back to whitelist.0 with some sample names they start showing up. What am I missing?

Labels (2)
0 Karma

zzo
Observer

Hi,

According to the documentation :

The <pathname> is relative to $SPLUNK_HOME.

So it won't work if the file is outside $SPLUNK_HOME.

Put it in 

etc/Automation/ServerEnvironmentList.csv

 

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...