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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Build the Future of Agentic AI: Join the Splunk Agentic Ops Hackathon

AI is changing how teams investigate incidents, detect threats, automate workflows, and build intelligent ...

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...