Getting Data In

More than one inputs.conf / config directory

Comradin
Engager

Hello fellow splunkers,

I know about $SPLUNK_HOME/etc/system/local/inputs.conf and using wildcards to minimize the amount of stanzas in it. I'd like to know if its somehow possible to define some kind of inpus.conf.d directory and have one inputs.conf-like file for every log we would like to monitor.

Our current inputs.conf is autogenerated and quite "messy". Having a directory with a dozen or so config files could be better and more clearly arranged.

Regards,
Marcus

Tags (1)
1 Solution

grijhwani
Motivator

Depending on how you generate the inputs.conf, you might consider creating the separate configurations under $SPLUNK_HOME/etc/apps/.

You would create a series of sub-directories to this, by whatever means you wanted to delineate, under those you would have "default" or "local" subdirectories, and in those you would have fragmentary files similar in content to the files you would normally find under etc/default or etc/local, which in your case would be stanzas from inputs.conf, e.g.

$SPLUNK_HOME/etc/apps/target1/default/inputs.conf
$SPLUNK_HOME/etc/apps/target2/default/inputs.conf
$SPLUNK_HOME/etc/apps/target3/default/inputs.conf

The these would augment the main default configurations.

You could see the total aggregate configuration using

# $SPLUNK_HOME/bin/splunk btool inputs list

View solution in original post

grijhwani
Motivator

Depending on how you generate the inputs.conf, you might consider creating the separate configurations under $SPLUNK_HOME/etc/apps/.

You would create a series of sub-directories to this, by whatever means you wanted to delineate, under those you would have "default" or "local" subdirectories, and in those you would have fragmentary files similar in content to the files you would normally find under etc/default or etc/local, which in your case would be stanzas from inputs.conf, e.g.

$SPLUNK_HOME/etc/apps/target1/default/inputs.conf
$SPLUNK_HOME/etc/apps/target2/default/inputs.conf
$SPLUNK_HOME/etc/apps/target3/default/inputs.conf

The these would augment the main default configurations.

You could see the total aggregate configuration using

# $SPLUNK_HOME/bin/splunk btool inputs list

Comradin
Engager

Thanks for the quick answer, this looks interesting. Ill have to check ..

0 Karma
Get Updates on the Splunk Community!

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

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

Combine Multiline Logs into a Single Event with SOCK: a Step-by-Step Guide for ...

Combine multiline logs into a single event with SOCK - a step-by-step guide for newbies Olga Malita The ...