Getting Data In

How do I forward data to a specific index?

cdavidy
Explorer

How do I go about configuring splunk forwarders running on Linux to forward to a specific index for Linux-related information? Since my indexer is running on Windows, I ws able to easily configure Windows-specific information to a dedicated index and would like to do the same thing for Linux systems since there are different retention policies for each platform. Thanks.

Tags (1)
1 Solution

the_wolverine
Champion

Assuming you have forwarding to indexer properly configured, as mentioned by BunnyHop, you'll just need to specify the custom index for your input at the Forwarder in an inputs.conf file.

Example:

[monitor:///var/log/*.log]
index = linux

It is important to mention that you must verify that the specified custom index exists on the indexer, otherwise your events go into a blackhole (which is the non-existent custom index).

The custom index can be created with a custom indexes.conf on your indexer:

Example:

[linux]
homePath   = $SPLUNK_DB/linux/db
coldPath   = $SPLUNK_DB/linux/colddb
thawedPath = $SPLUNK_DB/linux/thaweddb

View solution in original post

the_wolverine
Champion

Assuming you have forwarding to indexer properly configured, as mentioned by BunnyHop, you'll just need to specify the custom index for your input at the Forwarder in an inputs.conf file.

Example:

[monitor:///var/log/*.log]
index = linux

It is important to mention that you must verify that the specified custom index exists on the indexer, otherwise your events go into a blackhole (which is the non-existent custom index).

The custom index can be created with a custom indexes.conf on your indexer:

Example:

[linux]
homePath   = $SPLUNK_DB/linux/db
coldPath   = $SPLUNK_DB/linux/colddb
thawedPath = $SPLUNK_DB/linux/thaweddb

BunnyHop
Contributor

you specify them on the forwarder. You will have to configure it either from CLI or modifying the inputs.conf file.

CLI::

%SPLUNK%> splunk add monitor /path/to/your/log/ -index specific_index

Config File::

modify the %SPLUNK%\etc\system\local\inputs.conf (create it if it doesn't exist)

[monitor://fileyouremonitoring.log]

index = specific_index

Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...