<?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: change index metadata dynamically during ingestion in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/change-index-metadata-dynamically-during-ingestion/m-p/689575#M114776</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/268636"&gt;@iam_ironman&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I usually use this configuration.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Tue, 04 Jun 2024 15:28:57 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2024-06-04T15:28:57Z</dc:date>
    <item>
      <title>change index metadata dynamically during ingestion</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/change-index-metadata-dynamically-during-ingestion/m-p/689455#M114750</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I'm trying to see if logs can be send to different indexes at index time depending on regex.&amp;nbsp; Is it possible to send logs to index name that is part of Source metadata?&lt;BR /&gt;&lt;BR /&gt;Below are my props.conf and transforms.conf&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;P&gt;props.conf:&lt;BR /&gt;&lt;BR /&gt;[test:logs]&lt;BR /&gt;TRANSFORMS-new_index = new_index&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;transforms.conf&lt;BR /&gt;&lt;BR /&gt;[new_index]&lt;BR /&gt;SOURCE_KEY = MetaData:Source&lt;BR /&gt;REGEX = (?&amp;lt;index&amp;gt;\w+)\-\d+&amp;nbsp;&lt;BR /&gt;FORMAT = $1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#This needs to be dynamic&amp;nbsp;&lt;BR /&gt;DEST_KEY = _MetaData:Index&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jun 2024 21:11:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/change-index-metadata-dynamically-during-ingestion/m-p/689455#M114750</guid>
      <dc:creator>iam_ironman</dc:creator>
      <dc:date>2024-06-03T21:11:09Z</dc:date>
    </item>
    <item>
      <title>Re: change index metadata dynamically during ingestion</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/change-index-metadata-dynamically-during-ingestion/m-p/689456#M114751</link>
      <description>&lt;P&gt;What do you mean by "dynamic" here?&lt;/P&gt;&lt;P&gt;Also, you might need WRITE_META = true&lt;/P&gt;&lt;P&gt;Also also, you might want to use ingest actions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jun 2024 21:50:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/change-index-metadata-dynamically-during-ingestion/m-p/689456#M114751</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-06-03T21:50:20Z</dc:date>
    </item>
    <item>
      <title>Re: change index metadata dynamically during ingestion</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/change-index-metadata-dynamically-during-ingestion/m-p/689484#M114758</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/268636"&gt;@iam_ironman&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;only one question: why?&lt;/P&gt;&lt;P&gt;indexes aren't database tables, indexes are containers where logs are stored, the log categorization is done with sourcetype field.&lt;/P&gt;&lt;P&gt;usually custom indexes are mainly created when there are different requirements about retention and grant accesses and secondary for different log volumes.&lt;/P&gt;&lt;P&gt;So why do you want to create so many indexes, that you have to maintain and that after a retention time, will be empty?&lt;/P&gt;&lt;P&gt;Enyway, the rex you used is wrong, you don't need to extract the index field to assign a dinamic value to this field, you have to identify a group and use it for the index value:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[new_index]
SOURCE_KEY = MetaData:Source
REGEX = ^(\w+)\-\d+ 
FORMAT = $1 
DEST_KEY = _MetaData:Index&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2024 06:05:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/change-index-metadata-dynamically-during-ingestion/m-p/689484#M114758</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-06-04T06:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: change index metadata dynamically during ingestion</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/change-index-metadata-dynamically-during-ingestion/m-p/689489#M114759</link>
      <description>&lt;P&gt;While the general question is of course valid and needs to be considered properly, I saw similar cases in my experience - splitting data from a single source into separate indexes.&lt;/P&gt;&lt;P&gt;The most typical case is when you have a single solution providing logs for separate business entities (like a central security appliance protecting multiple divisions or even companies from a single business group).&lt;/P&gt;&lt;P&gt;You might want to split events so that each unit has access only to its own events (possibly with some overseeing security team having access to all those indexes).&lt;/P&gt;&lt;P&gt;So there are valid use cases for similar setups &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2024 06:52:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/change-index-metadata-dynamically-during-ingestion/m-p/689489#M114759</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-06-04T06:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: change index metadata dynamically during ingestion</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/change-index-metadata-dynamically-during-ingestion/m-p/689532#M114769</link>
      <description>&lt;P&gt;What I meant by "dynamic" is that the value for index should be what regex finds and uses it for FORMAT. I know I can use static value but wanted to confirm it that is something possible using regex to dynamically use correct index which is part to Source.&lt;BR /&gt;&lt;BR /&gt;Example of sources : phone-1234 , tablet-23456, pc-45623, pc-79954&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[new_index]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SOURCE_KEY = MetaData:Source&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;REGEX = (\w+)\-\d+&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FORMAT = $1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#This needs be either phone, tablet, pc etc. and don't want to make static&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;DEST_KEY = _MetaData:Index&lt;BR /&gt;WRITE_META = true&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2024 12:26:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/change-index-metadata-dynamically-during-ingestion/m-p/689532#M114769</guid>
      <dc:creator>iam_ironman</dc:creator>
      <dc:date>2024-06-04T12:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: change index metadata dynamically during ingestion</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/change-index-metadata-dynamically-during-ingestion/m-p/689533#M114770</link>
      <description>&lt;P&gt;Yes, that's exactly what that is for. Still, consider what &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt; already said - multiplying indexes is not always a good practice. There are different mechanisms for data "separation" depending on your use case.&lt;/P&gt;&lt;P&gt;Unless you need&lt;/P&gt;&lt;P&gt;- different access permissions&lt;/P&gt;&lt;P&gt;- different retention period&lt;/P&gt;&lt;P&gt;or you have significantly different data characteristics (cardinatility, volume and "sparsity") you should leave the data in the same index and limit your searches by adding conditions.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2024 12:29:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/change-index-metadata-dynamically-during-ingestion/m-p/689533#M114770</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-06-04T12:29:49Z</dc:date>
    </item>
    <item>
      <title>Re: change index metadata dynamically during ingestion</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/change-index-metadata-dynamically-during-ingestion/m-p/689545#M114773</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/268636"&gt;@iam_ironman&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;does it run in this way?&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2024 13:15:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/change-index-metadata-dynamically-during-ingestion/m-p/689545#M114773</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-06-04T13:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: change index metadata dynamically during ingestion</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/change-index-metadata-dynamically-during-ingestion/m-p/689547#M114774</link>
      <description>&lt;P&gt;Haven't tried yet, but wanted to confirm if it works for POC.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2024 13:17:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/change-index-metadata-dynamically-during-ingestion/m-p/689547#M114774</guid>
      <dc:creator>iam_ironman</dc:creator>
      <dc:date>2024-06-04T13:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: change index metadata dynamically during ingestion</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/change-index-metadata-dynamically-during-ingestion/m-p/689575#M114776</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/268636"&gt;@iam_ironman&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I usually use this configuration.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jun 2024 15:28:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/change-index-metadata-dynamically-during-ingestion/m-p/689575#M114776</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-06-04T15:28:57Z</dc:date>
    </item>
  </channel>
</rss>

