<?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 Rename host during indexing in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Rename-host-during-indexing/m-p/577183#M101944</link>
    <description>&lt;P&gt;Hello everyone, &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;i have the following question.&lt;BR /&gt;&lt;BR /&gt;In my environment i have 3 different UF where a scripted input is working with the original servername to extract some data. Thi sscript is inside one app i deployed the UF, so there is only one inputs.conf working.&lt;BR /&gt;&lt;BR /&gt;What i need to do, is to rename the host name.&lt;BR /&gt;I Know that i can do something with the transforms.conf and props.conf, but i dont know how to do this.&lt;BR /&gt;&lt;BR /&gt;example:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;Original Hostname&lt;/TD&gt;&lt;TD width="50%" height="25px"&gt;Needed Hostname&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;slc4E45&lt;/TD&gt;&lt;TD width="50%" height="25px"&gt;EMP&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;slc4P49&lt;/TD&gt;&lt;TD width="50%" height="25px"&gt;PMP&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;slc4L47&lt;/TD&gt;&lt;TD width="50%" height="25px"&gt;LMP&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe something like...&lt;BR /&gt;host = eval(case(host=slc4E45, EMP, host=slc4P49, PMP, host=slc4L47, LMP))&lt;BR /&gt;inside the transforms.conf.&lt;BR /&gt;&lt;BR /&gt;Thank you for your help.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 03 Dec 2021 08:31:50 GMT</pubDate>
    <dc:creator>klischatb</dc:creator>
    <dc:date>2021-12-03T08:31:50Z</dc:date>
    <item>
      <title>Rename host during indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Rename-host-during-indexing/m-p/577183#M101944</link>
      <description>&lt;P&gt;Hello everyone, &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;i have the following question.&lt;BR /&gt;&lt;BR /&gt;In my environment i have 3 different UF where a scripted input is working with the original servername to extract some data. Thi sscript is inside one app i deployed the UF, so there is only one inputs.conf working.&lt;BR /&gt;&lt;BR /&gt;What i need to do, is to rename the host name.&lt;BR /&gt;I Know that i can do something with the transforms.conf and props.conf, but i dont know how to do this.&lt;BR /&gt;&lt;BR /&gt;example:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;Original Hostname&lt;/TD&gt;&lt;TD width="50%" height="25px"&gt;Needed Hostname&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;slc4E45&lt;/TD&gt;&lt;TD width="50%" height="25px"&gt;EMP&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;slc4P49&lt;/TD&gt;&lt;TD width="50%" height="25px"&gt;PMP&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="50%" height="25px"&gt;slc4L47&lt;/TD&gt;&lt;TD width="50%" height="25px"&gt;LMP&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe something like...&lt;BR /&gt;host = eval(case(host=slc4E45, EMP, host=slc4P49, PMP, host=slc4L47, LMP))&lt;BR /&gt;inside the transforms.conf.&lt;BR /&gt;&lt;BR /&gt;Thank you for your help.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 08:31:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Rename-host-during-indexing/m-p/577183#M101944</guid>
      <dc:creator>klischatb</dc:creator>
      <dc:date>2021-12-03T08:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: Rename host during indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Rename-host-during-indexing/m-p/577184#M101945</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/189747"&gt;@klischatb&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;as you can read at&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/latest/Data/Overridedefaulthostassignments" target="_blank"&gt;https://docs.splunk.com/Documentation/SplunkCloud/latest/Data/Overridedefaulthostassignments&lt;/A&gt;&amp;nbsp;you can override host value based on a regex or a value,&lt;/P&gt;&lt;P&gt;in your case you have to put a props.conf and a transform.conf in your indexer or (when present) on your Heavy Forwarders:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[host::slc4E45]
TRANSFORMS-slc4E45 = override_host_slc4E45

[host::slc4P49]
TRANSFORMS-slc4E45 = override_host_slc4E45

[host::slc4L47]
TRANSFORMS-slc4E45 = override_host_slc4E45&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;transforms.conf&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[override_host_slc4E45]
REGEX = .
FORMAT = EMP
DEST_KEY = MetaData:Host

[override_host_slc4P49]
REGEX = .
FORMAT = PMP
DEST_KEY = MetaData:Host

[override_host_slc4L47]
REGEX = .
FORMAT = LMP
DEST_KEY = MetaData:Host&lt;/LI-CODE&gt;&lt;P&gt;Remember to restart Splunk after conf files modifying.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 08:41:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Rename-host-during-indexing/m-p/577184#M101945</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-12-03T08:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: Rename host during indexing</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Rename-host-during-indexing/m-p/577186#M101946</link>
      <description>&lt;P&gt;Thank you a lot &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;.&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":heavy_check_mark:"&gt;✔️&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Dec 2021 09:13:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Rename-host-during-indexing/m-p/577186#M101946</guid>
      <dc:creator>klischatb</dc:creator>
      <dc:date>2021-12-03T09:13:33Z</dc:date>
    </item>
  </channel>
</rss>

