Getting Data In

How can I have multiple apps hosts and inputs consolidated into single serverclass.conf & inputs.conf.dist?

newbie2tech
Communicator

Hi Team,

We have a cluster which has multiple apps under it. I am working on boarding the apps logs onto splunk.

So far we have been using individual apps which had their own serverclass.conf and inputs.conf.dist,index and role and we built it that way since now we are consolidating all the apps in a cluster to utilize same index and roles but have different hosts/inputs .

Question - How can i have hosts and inputs of the 2 apps[ hosts n inputs are completely different] specified in single serverclass.conf and inputs.conf.dist? does it have to be different stanzas or something along those lines?

Probably I can whitelist all hosts under serverclass.conf and all inputs in inputs.conf.dist and they get pushed out such that all the hosts [app1 & app2] will have all the configs [app1+app2], but this does not look efficient and I believe there is a better way to do it.

In our splunk environment deployment is automated i.e. by deployment server, separate deployers for search head cluster and indexer cluster.

Any guidance is appreciated, thanks in advance.

Please let me know if more details are needed.

 App1
    host1-app1.com
    host2-app1.com

    /app/services/weblog.log
    /app/services/weberror.log


    App2
    host1-app2.com
    host2-app2.com

    /app/dyn/system.log
    /app/dyn/systemerror.log
0 Karma
1 Solution

pradeepkumarg
Influencer

Yes, you can use one serverclass.conf and create multiple server classes. Each stanza is a separate server class

Example below

[serverClass:My_App1]
restartSplunkd = true
whitelist.0=host1
whitelist.1=host2
whitelist.2=host3
[serverClass:My_App1:app:my_inputs_1]

[serverClass:My_App2]
restartSplunkd = true
whitelist.0=host5
whitelist.1=host6
[serverClass:My_App2:app:my_inputs_2] 

View solution in original post

0 Karma

pradeepkumarg
Influencer

Yes, you can use one serverclass.conf and create multiple server classes. Each stanza is a separate server class

Example below

[serverClass:My_App1]
restartSplunkd = true
whitelist.0=host1
whitelist.1=host2
whitelist.2=host3
[serverClass:My_App1:app:my_inputs_1]

[serverClass:My_App2]
restartSplunkd = true
whitelist.0=host5
whitelist.1=host6
[serverClass:My_App2:app:my_inputs_2] 
0 Karma

newbie2tech
Communicator

Thanks Pradeep, i had used something similar!

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!

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

 Are you ready to revolutionize your IT operations? As digital transformation accelerates, the demand for ...

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...