<?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 transforms.conf in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/transforms-conf/m-p/526744#M88844</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;How to write transforms.conf for the fields that are not present in metadata&lt;/P&gt;&lt;P&gt;For example, I need to write transforms for the field - asset_env&lt;/P&gt;&lt;P&gt;asset_env = PROD&lt;/P&gt;&lt;P&gt;Below transforms were not working.&lt;/P&gt;&lt;P&gt;[change_index_name]&lt;BR /&gt;SOURCE_KEY = field:asset_env&lt;BR /&gt;REGEX = ^asset_env::(\w+)&lt;BR /&gt;DEST_KEY = _MetaData:Index&lt;BR /&gt;FORMAT = index_$1&lt;BR /&gt;~&lt;BR /&gt;~&lt;/P&gt;</description>
    <pubDate>Wed, 28 Oct 2020 03:15:17 GMT</pubDate>
    <dc:creator>VijaySrrie</dc:creator>
    <dc:date>2020-10-28T03:15:17Z</dc:date>
    <item>
      <title>transforms.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/transforms-conf/m-p/526744#M88844</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;How to write transforms.conf for the fields that are not present in metadata&lt;/P&gt;&lt;P&gt;For example, I need to write transforms for the field - asset_env&lt;/P&gt;&lt;P&gt;asset_env = PROD&lt;/P&gt;&lt;P&gt;Below transforms were not working.&lt;/P&gt;&lt;P&gt;[change_index_name]&lt;BR /&gt;SOURCE_KEY = field:asset_env&lt;BR /&gt;REGEX = ^asset_env::(\w+)&lt;BR /&gt;DEST_KEY = _MetaData:Index&lt;BR /&gt;FORMAT = index_$1&lt;BR /&gt;~&lt;BR /&gt;~&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 03:15:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/transforms-conf/m-p/526744#M88844</guid>
      <dc:creator>VijaySrrie</dc:creator>
      <dc:date>2020-10-28T03:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: transforms.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/transforms-conf/m-p/526760#M88848</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/164779"&gt;@VijaySrrie&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;let me understand: you want to create an index based on a condition (e.g. if host=host_prod, env=PROD otherwise is env=DEV), is it correct?&lt;/P&gt;&lt;P&gt;in this case you can create a calculated field [Settings -- Fields -- Calculated fields -- New calculated field] adding the rule for your sourcetype, e.g. for the above example&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;env=if(host=host_prod,"PROD","DEV")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 07:03:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/transforms-conf/m-p/526760#M88848</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-10-28T07:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: transforms.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/transforms-conf/m-p/526783#M88852</link>
      <description>&lt;P class="lia-align-justify"&gt;Host = abcdpr,xyzpr,abcps,xyzps etc......&lt;/P&gt;&lt;P class="lia-align-justify"&gt;asset_env = PROD,PSUP,PSVT etc...&lt;/P&gt;&lt;P class="lia-align-justify"&gt;We have different different asset_env like asset_env = PROD, asset_env=PSVT, asset_env=PSUP likewise.&lt;/P&gt;&lt;P class="lia-align-justify"&gt;I will create index like (index_PROD, index_PSUP, index_PSVT)&lt;/P&gt;&lt;P class="lia-align-justify"&gt;Based on the transforms.conf, the logs based on&amp;nbsp; asset_env should go to respective index&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 08:55:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/transforms-conf/m-p/526783#M88852</guid>
      <dc:creator>VijaySrrie</dc:creator>
      <dc:date>2020-10-28T08:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: transforms.conf</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/transforms-conf/m-p/526794#M88857</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/164779"&gt;@VijaySrrie&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;The easiest way is to manage the correct index addressingusing diferent inputs.conf for each host (you can manage them using a Deployment Server).&lt;/P&gt;&lt;P&gt;Otherwise you could override index on Indexers (of on Heavy Forwarders if present) based on the host value, something like this:&lt;/P&gt;&lt;P&gt;on props.conf&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[host::host_PROD]
TRANSFORMS-override_index_PROD = override_index_PROD

[host::host_DEV]
TRANSFORMS-override_index_DEV = override_index_DEV&lt;/LI-CODE&gt;&lt;P&gt;on transforms.conf&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[override_index_PROD]
REGEX = .
DEST_KEY = _MetaData:Index
FORMAT = index_PROD

[override_index_DEV]
REGEX = .
DEST_KEY = _MetaData:Index
FORMAT = index_DEV&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 28 Oct 2020 09:26:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/transforms-conf/m-p/526794#M88857</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-10-28T09:26:09Z</dc:date>
    </item>
  </channel>
</rss>

