<?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 How replace host using a field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-replace-host-using-a-field/m-p/340415#M159642</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm trying to replace the host value using a field in the data. I tried to find any previous similar solution but it's not working. &lt;/P&gt;

&lt;P&gt;A sample of the data is here:&lt;/P&gt;

&lt;P&gt;'##REC##;WWWDBDW;3221912927;wwwdbdw1;&lt;STRONG&gt;x52wwwdb01.domain.com&lt;/STRONG&gt;;11.2.0.4.0;Linux x86 64-bit;00008481;25-Aug-16 12:00:01;25.40;0.00;0.00;0.00;964278.51;0.00;2.55;4.06;1.59'&lt;/P&gt;

&lt;P&gt;props.conf&lt;BR /&gt;
[www_general_stats]&lt;BR /&gt;
TRANSFORMS-host = www_host&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;BR /&gt;
[www_host]&lt;BR /&gt;
SOURCE_KEY = _raw&lt;BR /&gt;
DEST_KEY = Metadata::Host&lt;BR /&gt;
FORMAT = host::$1&lt;BR /&gt;
REGEX = ^(?:[^;\n]*;){4}(?P[^;]+)&lt;/P&gt;

&lt;P&gt;Can anyone help me here, please?&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 15:07:49 GMT</pubDate>
    <dc:creator>tamakg</dc:creator>
    <dc:date>2020-09-29T15:07:49Z</dc:date>
    <item>
      <title>How replace host using a field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-replace-host-using-a-field/m-p/340415#M159642</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm trying to replace the host value using a field in the data. I tried to find any previous similar solution but it's not working. &lt;/P&gt;

&lt;P&gt;A sample of the data is here:&lt;/P&gt;

&lt;P&gt;'##REC##;WWWDBDW;3221912927;wwwdbdw1;&lt;STRONG&gt;x52wwwdb01.domain.com&lt;/STRONG&gt;;11.2.0.4.0;Linux x86 64-bit;00008481;25-Aug-16 12:00:01;25.40;0.00;0.00;0.00;964278.51;0.00;2.55;4.06;1.59'&lt;/P&gt;

&lt;P&gt;props.conf&lt;BR /&gt;
[www_general_stats]&lt;BR /&gt;
TRANSFORMS-host = www_host&lt;/P&gt;

&lt;P&gt;transforms.conf&lt;BR /&gt;
[www_host]&lt;BR /&gt;
SOURCE_KEY = _raw&lt;BR /&gt;
DEST_KEY = Metadata::Host&lt;BR /&gt;
FORMAT = host::$1&lt;BR /&gt;
REGEX = ^(?:[^;\n]*;){4}(?P[^;]+)&lt;/P&gt;

&lt;P&gt;Can anyone help me here, please?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:07:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-replace-host-using-a-field/m-p/340415#M159642</guid>
      <dc:creator>tamakg</dc:creator>
      <dc:date>2020-09-29T15:07:49Z</dc:date>
    </item>
    <item>
      <title>Re: How replace host using a field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-replace-host-using-a-field/m-p/340416#M159643</link>
      <description>&lt;P&gt;You don't need the &lt;CODE&gt;?P&lt;/CODE&gt; part in your regex.&lt;/P&gt;

&lt;P&gt;Use this instead: &lt;CODE&gt;REGEX = ^(?:[^;\n]*;){4}([^;]+)&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2017 19:49:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-replace-host-using-a-field/m-p/340416#M159643</guid>
      <dc:creator>rjthibod</dc:creator>
      <dc:date>2017-08-01T19:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: How replace host using a field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-replace-host-using-a-field/m-p/340417#M159644</link>
      <description>&lt;P&gt;I don't know what is "not working" (could be that it isn't finding the host properly and thus assigning something else in the field, or not assigning the host at all - you didn't really specify that). I do see two problems, one which was answered by  &lt;STRONG&gt;rjthibod&lt;/STRONG&gt; already and the other is the DEST_KEY. One colon instead of two:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;DEST_KEY = MetaData:Host
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Aug 2017 22:15:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-replace-host-using-a-field/m-p/340417#M159644</guid>
      <dc:creator>cpetterborg</dc:creator>
      <dc:date>2017-08-01T22:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: How replace host using a field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-replace-host-using-a-field/m-p/340418#M159645</link>
      <description>&lt;P&gt;The issue seems to be the upper case D of MetaData. Worked fine!&lt;/P&gt;

&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2017 22:27:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-replace-host-using-a-field/m-p/340418#M159645</guid>
      <dc:creator>tamakg</dc:creator>
      <dc:date>2017-08-01T22:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: How replace host using a field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-replace-host-using-a-field/m-p/340419#M159646</link>
      <description>&lt;P&gt;AND the single colon...&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2017 22:31:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-replace-host-using-a-field/m-p/340419#M159646</guid>
      <dc:creator>tamakg</dc:creator>
      <dc:date>2017-08-01T22:31:12Z</dc:date>
    </item>
  </channel>
</rss>

