Getting Data In

the order of whitelist in servercalss ?

sieutruc
Contributor

Hello,

I don't know what configuration my clientname win23_ ios_____dc_mm should gets in the configuration file below:

serverclasss.conf

[global]
blacklist.0 = *

[serverClass:AppsForOps]
filterType = whitelist
whitelist.0=win23_*

[serverClass:AppsForOps1]
filterType = whitelist
whitelist.0=win23_ ios_____dc*

So my question is which serverclass configuration my machine will get ?

Tags (1)
0 Karma
1 Solution

kristian_kolb
Ultra Champion

Both. It's just a function to group deployment clients on some common attribute. think of it like this for your three hosts;

win-prod-www1.company.com
win-prod-www2.company.com
win-test-www.company.com

1 and 2 are production machines, 3 is test. All are windows/iis. All WinEventLogs should go to the same index regardless of prod/test, iis logs in prod should be kept for 1 year, iis logs for test should be kept for 30 days.

[serverClass:windows] 
whitelist.0 = win*
[serverClass:windows:app:WinEvt] 

[serverClass:web_prod] 
whitelist.0 = win-prod*
[serverClass:web_prod:app:iis_prod]

[serverClass:web_test] 
whitelist.0 = win-test*
[serverClass:web_test:app:iis_test] 

Then you define 3 different apps in $SPLUNK_HOME/etc/deployment-apps/<app_name>

All hosts will get the WinEvt app, since they all match that class.
1 and 2 will get the iis_prod app (directing the web logs to one index)
test will get the iis_test app (directing the web logs to another index, with a short retention time).


UPDATE:

Naturally, there is more than one way to do it. In the above scenario, you could also have this config to achieve the same results (contents of the apps are the same as before);

[serverClass:web_prod] 
whitelist.0 = win-prod*
[serverClass:web_prod:app:iis_prod]
[serverClass:web_prod:app:WinEvt] 

[serverClass:web_test] 
whitelist.0 = win-test*
[serverClass:web_test:app:iis_test] 
[serverClass:web_test:app:WinEvt] 

OR you could merge the contents of the apps into a single app per serverClass

[serverClass:web_prod] 
whitelist.0 = win-prod*
[serverClass:web_prod:app:iis_prod_and_winevent]

[serverClass:web_test] 
whitelist.0 = win-test*
[serverClass:web_test:app:iis_test_and_winevent] 

There will always be trade-offs between modularity of configurations (apps) and clarity of the serverclass.conf. There is no single 'best' solution.

Hope this helps,

Kristian

View solution in original post

kristian_kolb
Ultra Champion

Both. It's just a function to group deployment clients on some common attribute. think of it like this for your three hosts;

win-prod-www1.company.com
win-prod-www2.company.com
win-test-www.company.com

1 and 2 are production machines, 3 is test. All are windows/iis. All WinEventLogs should go to the same index regardless of prod/test, iis logs in prod should be kept for 1 year, iis logs for test should be kept for 30 days.

[serverClass:windows] 
whitelist.0 = win*
[serverClass:windows:app:WinEvt] 

[serverClass:web_prod] 
whitelist.0 = win-prod*
[serverClass:web_prod:app:iis_prod]

[serverClass:web_test] 
whitelist.0 = win-test*
[serverClass:web_test:app:iis_test] 

Then you define 3 different apps in $SPLUNK_HOME/etc/deployment-apps/<app_name>

All hosts will get the WinEvt app, since they all match that class.
1 and 2 will get the iis_prod app (directing the web logs to one index)
test will get the iis_test app (directing the web logs to another index, with a short retention time).


UPDATE:

Naturally, there is more than one way to do it. In the above scenario, you could also have this config to achieve the same results (contents of the apps are the same as before);

[serverClass:web_prod] 
whitelist.0 = win-prod*
[serverClass:web_prod:app:iis_prod]
[serverClass:web_prod:app:WinEvt] 

[serverClass:web_test] 
whitelist.0 = win-test*
[serverClass:web_test:app:iis_test] 
[serverClass:web_test:app:WinEvt] 

OR you could merge the contents of the apps into a single app per serverClass

[serverClass:web_prod] 
whitelist.0 = win-prod*
[serverClass:web_prod:app:iis_prod_and_winevent]

[serverClass:web_test] 
whitelist.0 = win-test*
[serverClass:web_test:app:iis_test_and_winevent] 

There will always be trade-offs between modularity of configurations (apps) and clarity of the serverclass.conf. There is no single 'best' solution.

Hope this helps,

Kristian

kristian_kolb
Ultra Champion

see update above.

0 Karma
Get Updates on the Splunk Community!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...