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!

Introducing the 2024 SplunkTrust!

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

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...