Getting Data In

Monitoring multiple servers/paths with a single inputs.conf app

joesrepsolc
Communicator

Trying to setup an "intelligent" inputs.conf that uses the system name of the forwarder then uses the correct path for the monitor input line based on that system name. For instance, "testserver1" uses the inputs for the directory with "server1", and "testserver2" uses the inputs for the directory with "server2".

Otherwise I have to create many separate apps, and server classes to be deployed to each individual server. There are many. Would be great to deploy 1 ap/server class to all (70) servers, and have them detect which monitor lines to use.

Can an inputs.conf be aware of the forwarders hostname, and be written to look for just that match?

testserver1.domain.com
/opt/projects/teams/server1/*.log
/opt/projects/teams/server1/webapps/access*.log*

testserver2.domain.com
/opt/projects/teams/server2/*.log
/opt/projects/teams/server2/webapps/access*.log

testserver3.domain.com
/opt/projects/teams/server3/*.log
/opt/projects/teams/server3/webapps/access*.log
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi joesrepsolc,
did you tried a single stanza with with something like this:

[monitor:///opt/projects/teams/*/]
whitelist = \.log$|webapps\/access.\.log

Bye.
Giuseppe

0 Karma

woodcock
Esteemed Legend

The closest that you can do is this:

 /opt/projects/teams/*/*.log
 /opt/projects/teams/*/webapps/access*.log*
0 Karma
Get Updates on the Splunk Community!

Shape the Future of Splunk: Join the Product Research Lab!

Join the Splunk Product Research Lab and connect with us in the Slack channel #product-research-lab to get ...

Auto-Injector for Everything Else: Making OpenTelemetry Truly Universal

You might have seen Splunk’s recent announcement about donating the OpenTelemetry Injector to the ...

[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 ...