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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...