<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can [splunktcp://XXX] be forced to a specific index in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Can-splunktcp-XXX-be-forced-to-a-specific-index/m-p/69700#M14155</link>
    <description>&lt;P&gt;The "splunktcp" input is not a "data" input, but instead an input to listen to Splunk Forwarders.&lt;/P&gt;

&lt;P&gt;Instead you can do one of the following:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;Set this in the Forwarder's inputs.conf for each stanza, i.e.:&lt;/P&gt;

&lt;P&gt;[monitor:///var/log]&lt;BR /&gt;
disabled = false&lt;BR /&gt;
index = blah&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Create a transform on the Indexer to override the _MetaData::index field at index time., i.e.&lt;/P&gt;

&lt;P&gt;$ cat transforms.conf&lt;BR /&gt;
[setIndexMeta]&lt;BR /&gt;
DEFAULT_VALUE = unknown&lt;BR /&gt;
REGEX = .&lt;BR /&gt;
DEST_KEY = _MetaData:Index&lt;BR /&gt;
FORMAT = blah&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;...and you can call the transforms from props.conf by specifying a host, source or source type upon which to apply the transform.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 11:23:02 GMT</pubDate>
    <dc:creator>itinney</dc:creator>
    <dc:date>2020-09-28T11:23:02Z</dc:date>
    <item>
      <title>Can [splunktcp://XXX] be forced to a specific index</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-splunktcp-XXX-be-forced-to-a-specific-index/m-p/69699#M14154</link>
      <description>&lt;P&gt;Hi all&lt;/P&gt;

&lt;P&gt;I've configured the following in inputs.conf on our indexer:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;[splunktcp://9998]&lt;BR /&gt;&lt;BR /&gt;
index=blah&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;The universal forwarders are configured to send to this port (I've disabled port 9997 on the indexer to be sure) however data still ends up in the main index.&lt;/P&gt;

&lt;P&gt;I've checked './bin/splunk cmd btool transforms list --debug' and there are no transforms redirecting to other indexes. The only reference to 'index' in our transforms is:&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;system     [splunk_index_history]&lt;BR /&gt;&lt;BR /&gt;
system     CAN_OPTIMIZE = True&lt;BR /&gt;&lt;BR /&gt;
system     CLEAN_KEYS = True&lt;BR /&gt;&lt;BR /&gt;
system     DEFAULT_VALUE = &lt;BR /&gt;&lt;BR /&gt;
system     DEST_KEY = _MetaData:Index&lt;BR /&gt;&lt;BR /&gt;
system     FORMAT = history&lt;BR /&gt;&lt;BR /&gt;
system     KEEP_EMPTY_VALS = False&lt;BR /&gt;&lt;BR /&gt;
system     LOOKAHEAD = 4096&lt;BR /&gt;&lt;BR /&gt;
system     MV_ADD = False&lt;BR /&gt;&lt;BR /&gt;
system     REGEX = .&lt;BR /&gt;&lt;BR /&gt;
system     SOURCE_KEY = _raw&lt;BR /&gt;&lt;BR /&gt;
system     WRITE_META = False&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;... which shouldn't cause any problems.&lt;/P&gt;

&lt;P&gt;Does anyone know why that global input stanza isn't working?&lt;/P&gt;

&lt;P&gt;Many thanks&lt;/P&gt;

&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:22:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-splunktcp-XXX-be-forced-to-a-specific-index/m-p/69699#M14154</guid>
      <dc:creator>jimcroft</dc:creator>
      <dc:date>2020-09-28T11:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: Can [splunktcp://XXX] be forced to a specific index</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-splunktcp-XXX-be-forced-to-a-specific-index/m-p/69700#M14155</link>
      <description>&lt;P&gt;The "splunktcp" input is not a "data" input, but instead an input to listen to Splunk Forwarders.&lt;/P&gt;

&lt;P&gt;Instead you can do one of the following:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;P&gt;Set this in the Forwarder's inputs.conf for each stanza, i.e.:&lt;/P&gt;

&lt;P&gt;[monitor:///var/log]&lt;BR /&gt;
disabled = false&lt;BR /&gt;
index = blah&lt;/P&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Create a transform on the Indexer to override the _MetaData::index field at index time., i.e.&lt;/P&gt;

&lt;P&gt;$ cat transforms.conf&lt;BR /&gt;
[setIndexMeta]&lt;BR /&gt;
DEFAULT_VALUE = unknown&lt;BR /&gt;
REGEX = .&lt;BR /&gt;
DEST_KEY = _MetaData:Index&lt;BR /&gt;
FORMAT = blah&lt;/P&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;...and you can call the transforms from props.conf by specifying a host, source or source type upon which to apply the transform.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 11:23:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-splunktcp-XXX-be-forced-to-a-specific-index/m-p/69700#M14155</guid>
      <dc:creator>itinney</dc:creator>
      <dc:date>2020-09-28T11:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: Can [splunktcp://XXX] be forced to a specific index</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-splunktcp-XXX-be-forced-to-a-specific-index/m-p/69701#M14156</link>
      <description>&lt;P&gt;Thanks itinney&lt;/P&gt;

&lt;P&gt;So is the documentation for inputs.conf wrong or am I just reading it wrong? It says that 'index = ' is general setting and...&lt;/P&gt;

&lt;P&gt;&lt;EM&gt;The following attribute/value pairs are valid for all input types (except file system change monitor,&lt;BR /&gt;
which is described in a separate section in this file)&lt;/EM&gt; &lt;/P&gt;

&lt;P&gt;There's no indication that it shouldn't work with [splunktcp://XXXX] stanzas.&lt;/P&gt;

&lt;P&gt;Do you mind if I run my use case by you and see if you have any ideas?&lt;/P&gt;

&lt;P&gt;We're a managed service provider looking after various customers AWS estates. We collect their logs in Splunk. I'm building a new Splunk 4.3 setup and reviewing all the reports, security, etc.&lt;/P&gt;

&lt;P&gt;What I'm trying to achieve is some kind of security and data isolation around receiving data from the forwarders. There are two main issues I'm trying resolve:&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;We cannot guarantee hostname uniqueness across clients (so I want a separate index per client).&lt;/LI&gt;
&lt;LI&gt;Some clients are have admin rights to some servers meaning I cannot rely 100% on them not tampering with the forwarder config. So I want to rely on the [splunktcp://XXXX] port they (any only they) have access to.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;What I wanted to do was setup a specific listener port per client and have that listener directed to the clients index. And I'd like this enforced at the indexer rather than forwarder.&lt;/P&gt;

&lt;P&gt;Is this at all possible or do I need to rethink this?&lt;/P&gt;

&lt;P&gt;Any thoughts you have would be welcome.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2012 17:30:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-splunktcp-XXX-be-forced-to-a-specific-index/m-p/69701#M14156</guid>
      <dc:creator>jimcroft</dc:creator>
      <dc:date>2012-02-10T17:30:35Z</dc:date>
    </item>
    <item>
      <title>Re: Can [splunktcp://XXX] be forced to a specific index</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-splunktcp-XXX-be-forced-to-a-specific-index/m-p/69702#M14157</link>
      <description>&lt;P&gt;I know that this is a very old question. As much searching has not yielded an appropriate solution, I was curious as to your end result. I too would like to be able to enforce the destination index on the indexer as opposed to relying on the forwarder specifying it. It seems to me that allowing the forwarder specify the destination index is a bit of a secuirty issue as one is essentially relying on user input which is generally a security no-no.Did you ever come up with a solution do enforce the destination index on the indexer? Or did you wind up relying on the forwarder to specify it?&lt;/P&gt;

&lt;P&gt;Thanks much&lt;/P&gt;</description>
      <pubDate>Wed, 24 Oct 2012 21:12:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-splunktcp-XXX-be-forced-to-a-specific-index/m-p/69702#M14157</guid>
      <dc:creator>mce128</dc:creator>
      <dc:date>2012-10-24T21:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Can [splunktcp://XXX] be forced to a specific index</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-splunktcp-XXX-be-forced-to-a-specific-index/m-p/69703#M14158</link>
      <description>&lt;P&gt;Note that in itinney's answer, he says how to do this using transforms.conf&lt;/P&gt;

&lt;P&gt;If you are using Universal Forwarders, transforms.conf must be on the indexers. This would accomplish your goal.&lt;/P&gt;

&lt;P&gt;It will add overhead to the parsing to do it this way, though.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Oct 2012 21:29:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-splunktcp-XXX-be-forced-to-a-specific-index/m-p/69703#M14158</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-10-24T21:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: Can [splunktcp://XXX] be forced to a specific index</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-splunktcp-XXX-be-forced-to-a-specific-index/m-p/69704#M14159</link>
      <description>&lt;P&gt;If the forwarder's inputs.conf defines an index, that will override the splunktcp setting for index destination.&lt;/P&gt;

&lt;P&gt;You may need a transforms.conf rule like the one cited above to enforce the "per host/port" destination index.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Oct 2012 22:14:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-splunktcp-XXX-be-forced-to-a-specific-index/m-p/69704#M14159</guid>
      <dc:creator>sowings</dc:creator>
      <dc:date>2012-10-24T22:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: Can [splunktcp://XXX] be forced to a specific index</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-splunktcp-XXX-be-forced-to-a-specific-index/m-p/69705#M14160</link>
      <description>&lt;P&gt;Thx so much, second solution is handy but look like a workaround.&lt;BR /&gt;
First solution reflect how Splunk UF are meant to be configured to define a specific index for a source, and I totally missed that.&lt;/P&gt;</description>
      <pubDate>Mon, 18 May 2020 14:35:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-splunktcp-XXX-be-forced-to-a-specific-index/m-p/69705#M14160</guid>
      <dc:creator>broomcupboardsu</dc:creator>
      <dc:date>2020-05-18T14:35:35Z</dc:date>
    </item>
    <item>
      <title>Re: Can [splunktcp://XXX] be forced to a specific index</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-splunktcp-XXX-be-forced-to-a-specific-index/m-p/562588#M100262</link>
      <description>&lt;P&gt;"&lt;SPAN&gt;The "splunktcp" input is not a "data" input, but instead an input to listen to Splunk Forwarders."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thank you, this clarified the problem for me as I was experiencing the same issue.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Aug 2021 14:10:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-splunktcp-XXX-be-forced-to-a-specific-index/m-p/562588#M100262</guid>
      <dc:creator>ephemeric</dc:creator>
      <dc:date>2021-08-09T14:10:32Z</dc:date>
    </item>
  </channel>
</rss>

