Getting Data In

If I have 2 identical inputs.conf monitor stanzas except for the target indexes, will data be received in both indexes or only the first?

mmensch
Path Finder

Hello,

I just had a quick question about the inputs.conf file in the Splunk Universal Forwarders.

Let's say, I have these two stanzas in my inputs.conf file:

[monitor:/usr/output.log]
_TCP_ROUTING = *
index = index1
sourcetype = user_logs

[monitor:/usr/output.log]
_TCP_ROUTING = *
index = index2
sourcetype = user_logs

I am curious if data will be received in both indexes, or if the data will only go to the first index?

Thanks,
Matt

0 Karma
1 Solution

woodcock
Esteemed Legend

The data will go to the first index. There are many rules that cover precedence but if everything is identical, the first one will take precedence over the second one. To see what Splunk thinks is being used, run this:

$SPLUNK_HOME/splunk cmd btool inputs list --debug

View solution in original post

lguinn2
Legend

You might also want to read the Configuration File Precedence section of the Administration manual to understand how it works. The rules aren't difficult and it will really help you as a Splunk administrator to understand how they work.

As @woodcock points out, btool is a great way to look out the results of the precedence rule operation.

woodcock
Esteemed Legend

The data will go to the first index. There are many rules that cover precedence but if everything is identical, the first one will take precedence over the second one. To see what Splunk thinks is being used, run this:

$SPLUNK_HOME/splunk cmd btool inputs list --debug
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...