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!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...