<?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: overwrite index on heavy forwarder based on port in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/overwrite-index-on-heavy-forwarder-based-on-port/m-p/505929#M86182</link>
    <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;Yes, that is the easy way, my problem is that I'm getting data from a Universal Forwarder, that I do not have any control over, it is located at a vendor, but I'm also required to store the data. The Universal Forwarders have used the index stanza, so there is not an easy way to overwrite that.&lt;/P&gt;</description>
    <pubDate>Wed, 24 Jun 2020 10:14:32 GMT</pubDate>
    <dc:creator>las</dc:creator>
    <dc:date>2020-06-24T10:14:32Z</dc:date>
    <item>
      <title>overwrite index on heavy forwarder based on port</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/overwrite-index-on-heavy-forwarder-based-on-port/m-p/464051#M80024</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;

&lt;P&gt;We are about to ingest logs from multiple suppliers, where the individual supplier has full control over their infrastructure.&lt;BR /&gt;
My take was to to create a couple of heavy forwarders and dedicate a port to each supplier:&lt;BR /&gt;
supplier_1 sends data to port 9991&lt;BR /&gt;
supplier_2 sends data to port 9992&lt;BR /&gt;
...&lt;BR /&gt;
This part I think I have working.&lt;/P&gt;

&lt;P&gt;The next problem is that I have a need to separate the data from supplier_1 from supplier_2, My thought was to create a index per supplier.&lt;BR /&gt;
The problem is then how do I route data received from port 9991 to index_1 regardless of what is configured on the Universal Forwarder, except for Splunk stuff (_internal ...) the different suppliers might use the same source or sourcetype, so it is only the receiving port on the heavy forwarder I might use to separate the data.&lt;/P&gt;

&lt;P&gt;Any help is much appreciated&lt;/P&gt;

&lt;P&gt;Kind regards&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:49:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/overwrite-index-on-heavy-forwarder-based-on-port/m-p/464051#M80024</guid>
      <dc:creator>las</dc:creator>
      <dc:date>2020-09-30T04:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: overwrite index on heavy forwarder based on port</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/overwrite-index-on-heavy-forwarder-based-on-port/m-p/464052#M80025</link>
      <description>&lt;P&gt;Hi @las,&lt;BR /&gt;
suppliers systems send data by syslog or they are Universal Forwarders?&lt;/P&gt;

&lt;P&gt;if they are syslogs, you can identify supplier from the source (tcp://9991 or tcp://9992) and you can use the source field to perform an index override:&lt;BR /&gt;
On your heavy forwarders:&lt;/P&gt;

&lt;P&gt;in &lt;STRONG&gt;transforms.conf&lt;/STRONG&gt; &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[overrideindex]
DEST_KEY =_MetaData:Index
REGEX = .
FORMAT = index1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;in &lt;STRONG&gt;props.conf&lt;/STRONG&gt; &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::tcp://9991]
TRANSFORMS-index = overrideindex
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If they are Universal Forwarders, it's more difficoult, you need a way to identify them: e.g. a one or more values in one or more fields that identify supplier servers.&lt;BR /&gt;
Or if you know the list of servers from each supplier, you could use a lookup to identify them.&lt;/P&gt;

&lt;P&gt;Anyway, I don't like to have more indexes containing the same data, I prefer to identify sources in a different way (source or another field).&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2020 08:23:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/overwrite-index-on-heavy-forwarder-based-on-port/m-p/464052#M80025</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-03-30T08:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: overwrite index on heavy forwarder based on port</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/overwrite-index-on-heavy-forwarder-based-on-port/m-p/464053#M80026</link>
      <description>&lt;P&gt;Hi Guiseppe.&lt;/P&gt;

&lt;P&gt;I had the idea, that it would be from Universal Forwarders.&lt;/P&gt;

&lt;P&gt;Generally I aggree with you, that it is a bad idea to have the same sourcetypes in multiple indexes, but here it makes sense, as only a select few will have access to data from a specific supplier.&lt;/P&gt;

&lt;P&gt;Kind regards&lt;BR /&gt;
Lars&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2020 09:03:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/overwrite-index-on-heavy-forwarder-based-on-port/m-p/464053#M80026</guid>
      <dc:creator>las</dc:creator>
      <dc:date>2020-03-30T09:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: overwrite index on heavy forwarder based on port</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/overwrite-index-on-heavy-forwarder-based-on-port/m-p/464054#M80027</link>
      <description>&lt;P&gt;Hi Lars,&lt;BR /&gt;
find field/s to identify suppliers, then you can create an automatic field to classify events by Supplier.&lt;/P&gt;

&lt;P&gt;e.g. if all hostnames of Supplier1 start with "srv" and hostnames of Supplier2 don't, you can create a calculated field: &lt;CODE&gt;| eval Supplier=if(host="srv*","Supplier1","Supplier2")&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2020 09:48:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/overwrite-index-on-heavy-forwarder-based-on-port/m-p/464054#M80027</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-03-30T09:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: overwrite index on heavy forwarder based on port</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/overwrite-index-on-heavy-forwarder-based-on-port/m-p/505912#M86177</link>
      <description>&lt;P&gt;Hi Guiseppe.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I still haven't put this one to rest.&lt;/P&gt;&lt;P&gt;If I use the _meta in inputs.conf&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[splunktcp-ssl:9990]
disabled = 0
_meta userindex::index1

[splunktcp-ssl:9991]
disabled = 0
_meta userindex::index2&lt;/LI-CODE&gt;&lt;P&gt;then I might be able to route everything thru to my transform where I could do something like this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[force_index]
DEST_KEY = _MetaData:Index
REGEX = userindex::(\w*)\s
FORMAT = $1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you think this might be a possible solution?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards.&lt;/P&gt;&lt;P&gt;Lars&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 08:45:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/overwrite-index-on-heavy-forwarder-based-on-port/m-p/505912#M86177</guid>
      <dc:creator>las</dc:creator>
      <dc:date>2020-06-24T08:45:23Z</dc:date>
    </item>
    <item>
      <title>Re: overwrite index on heavy forwarder based on port</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/overwrite-index-on-heavy-forwarder-based-on-port/m-p/505925#M86180</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/36534"&gt;@las&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;does it run?&lt;/P&gt;&lt;P&gt;if yes it's a good idea,&lt;/P&gt;&lt;P&gt;I usually don't like to modify indexe value, but it's an idea of mine!&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 09:31:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/overwrite-index-on-heavy-forwarder-based-on-port/m-p/505925#M86180</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-06-24T09:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: overwrite index on heavy forwarder based on port</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/overwrite-index-on-heavy-forwarder-based-on-port/m-p/505926#M86181</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Since you want to do it in HF, you can modify the input stanza to specify the default index.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[tcp://9991]
index = supplier1

[tcp://9992]
index = supplier2&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OR you can add the props &amp;amp; transforms&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;transforms.conf&lt;/STRONG&gt; (if you want to filter you can use sourcekey &amp;amp; regex)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[tcp9991_syslog_supplier1]
SOURCE_KEY = MetaData:Host
REGEX = (10.*.*.*)
DEST_KEY = _MetaData:Index
FORMAT = supplier1

[tcp9992_syslog_supplier2]
SOURCE_KEY = MetaData:Host
REGEX = (10.*.*.*)
DEST_KEY = _MetaData:Index
FORMAT = supplier2&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 09:47:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/overwrite-index-on-heavy-forwarder-based-on-port/m-p/505926#M86181</guid>
      <dc:creator>dmuraleetcs</dc:creator>
      <dc:date>2020-06-24T09:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: overwrite index on heavy forwarder based on port</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/overwrite-index-on-heavy-forwarder-based-on-port/m-p/505929#M86182</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;Yes, that is the easy way, my problem is that I'm getting data from a Universal Forwarder, that I do not have any control over, it is located at a vendor, but I'm also required to store the data. The Universal Forwarders have used the index stanza, so there is not an easy way to overwrite that.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 10:14:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/overwrite-index-on-heavy-forwarder-based-on-port/m-p/505929#M86182</guid>
      <dc:creator>las</dc:creator>
      <dc:date>2020-06-24T10:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: overwrite index on heavy forwarder based on port</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/overwrite-index-on-heavy-forwarder-based-on-port/m-p/507093#M86290</link>
      <description>&lt;P&gt;Hi Guiseppe.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have not been sucessfull yet, but I'm still working on the principal and have asked another question on how the reference the _meta variable in a transform.&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;Lars&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jul 2020 14:21:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/overwrite-index-on-heavy-forwarder-based-on-port/m-p/507093#M86290</guid>
      <dc:creator>las</dc:creator>
      <dc:date>2020-07-02T14:21:31Z</dc:date>
    </item>
  </channel>
</rss>

