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!

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...