<?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: Host transforms not working in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Host-transforms-not-working/m-p/459450#M79343</link>
    <description>&lt;UL&gt;
&lt;LI&gt;check for typos&lt;/LI&gt;
&lt;LI&gt;did you restart Splunk after the change?&lt;/LI&gt;
&lt;LI&gt;check &lt;CODE&gt;$SPLUNK_HOME/bin/splunk btool props list --debug&lt;/CODE&gt; and &lt;CODE&gt;$SPLUNK_HOME/bin/splunk btool transforms list --debug&lt;/CODE&gt; to see if your config is used&lt;/LI&gt;
&lt;LI&gt;Make sure the host name in the props stanza matches the entire name, not just a substring (and it is case sensitive &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; )&lt;/LI&gt;
&lt;LI&gt;Should not be a show stopper, but in the regex use a &lt;CODE&gt;\.&lt;/CODE&gt; to match a &lt;CODE&gt;.&lt;/CODE&gt; &lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Beside that, out of ideas right now &lt;CODE&gt;¯\_(ツ)_/¯&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 15 May 2019 21:00:47 GMT</pubDate>
    <dc:creator>MuS</dc:creator>
    <dc:date>2019-05-15T21:00:47Z</dc:date>
    <item>
      <title>Host transforms not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Host-transforms-not-working/m-p/459445#M79338</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;

&lt;P&gt;I have the following props and transfroms&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[host::splunk-sh1]
TRANSFORMS-vdisyslogs = set_host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Transforms.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[set_host]
REGEX = [ies|wv|inn].*.mentorg.com
DEST_KEY = MetaData:Host
FORMAT = host::$1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But the host value is set to $1 and not the ies|wv|inn.*.mentorg.com.  It works when I run the following search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="remoteaccess" sourcetype="vdi:syslogs" 
| rex field=_raw "(?&amp;lt;host&amp;gt;[ies|wv|inn].*.mentorg.com)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What do I have wrong and why is it wrong?&lt;/P&gt;

&lt;P&gt;Thanks&lt;BR /&gt;
ed&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 18:24:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Host-transforms-not-working/m-p/459445#M79338</guid>
      <dc:creator>edwardrose</dc:creator>
      <dc:date>2019-05-15T18:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: Host transforms not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Host-transforms-not-working/m-p/459446#M79339</link>
      <description>&lt;P&gt;Please try - &lt;CODE&gt;REGEX = ([ies|wv|inn]).*.mentorg.com&lt;/CODE&gt; for the capture group.&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 20:28:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Host-transforms-not-working/m-p/459446#M79339</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2019-05-15T20:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: Host transforms not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Host-transforms-not-working/m-p/459447#M79340</link>
      <description>&lt;P&gt;almost &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; &lt;/P&gt;

&lt;P&gt;Set the capturing group to be &lt;CODE&gt;([ies|wv|inn].*.mentorg.com)&lt;/CODE&gt; to be used as &lt;CODE&gt;$1&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 20:43:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Host-transforms-not-working/m-p/459447#M79340</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2019-05-15T20:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: Host transforms not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Host-transforms-not-working/m-p/459448#M79341</link>
      <description>&lt;P&gt;Nope that did not work.  The host field still shows up as $1&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 20:44:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Host-transforms-not-working/m-p/459448#M79341</guid>
      <dc:creator>edwardrose</dc:creator>
      <dc:date>2019-05-15T20:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: Host transforms not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Host-transforms-not-working/m-p/459449#M79342</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;

&lt;P&gt;I could see two issues.&lt;/P&gt;

&lt;P&gt;1) You regex may be too greedy sometimes (or incorrect).  Please see regex sample on what all your regex will match  &lt;A href="https://regex101.com/r/xSWLH1/2"&gt;https://regex101.com/r/xSWLH1/2&lt;/A&gt; .&lt;BR /&gt;&lt;BR /&gt;
 Better regex is : &lt;A href="https://regex101.com/r/d5QXlN/2"&gt;https://regex101.com/r/d5QXlN/2&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;2) Capture group is a MUST if you put FORMAT&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [set_host]
 REGEX = ([ies|wv|inn].*?\.mentorg\.com)
 DEST_KEY = MetaData:Host
 FORMAT = host::$1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 May 2019 20:56:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Host-transforms-not-working/m-p/459449#M79342</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2019-05-15T20:56:55Z</dc:date>
    </item>
    <item>
      <title>Re: Host transforms not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Host-transforms-not-working/m-p/459450#M79343</link>
      <description>&lt;UL&gt;
&lt;LI&gt;check for typos&lt;/LI&gt;
&lt;LI&gt;did you restart Splunk after the change?&lt;/LI&gt;
&lt;LI&gt;check &lt;CODE&gt;$SPLUNK_HOME/bin/splunk btool props list --debug&lt;/CODE&gt; and &lt;CODE&gt;$SPLUNK_HOME/bin/splunk btool transforms list --debug&lt;/CODE&gt; to see if your config is used&lt;/LI&gt;
&lt;LI&gt;Make sure the host name in the props stanza matches the entire name, not just a substring (and it is case sensitive &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; )&lt;/LI&gt;
&lt;LI&gt;Should not be a show stopper, but in the regex use a &lt;CODE&gt;\.&lt;/CODE&gt; to match a &lt;CODE&gt;.&lt;/CODE&gt; &lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Beside that, out of ideas right now &lt;CODE&gt;¯\_(ツ)_/¯&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 21:00:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Host-transforms-not-working/m-p/459450#M79343</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2019-05-15T21:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: Host transforms not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Host-transforms-not-working/m-p/459451#M79344</link>
      <description>&lt;P&gt;@MuS&lt;/P&gt;

&lt;P&gt;Your answer was correct and worked.&lt;/P&gt;

&lt;P&gt;Thanks&lt;BR /&gt;
ed&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 21:26:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Host-transforms-not-working/m-p/459451#M79344</guid>
      <dc:creator>edwardrose</dc:creator>
      <dc:date>2019-05-15T21:26:27Z</dc:date>
    </item>
    <item>
      <title>Re: Host transforms not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Host-transforms-not-working/m-p/459452#M79345</link>
      <description>&lt;P&gt;@MuS - why my cheerful &lt;CODE&gt;REGEX = ([ies|wv|inn]).*.mentorg.com&lt;/CODE&gt; is broken? ; -) after all we want &lt;STRONG&gt;just&lt;/STRONG&gt; ies or wv or inn? &lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 21:30:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Host-transforms-not-working/m-p/459452#M79345</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2019-05-15T21:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: Host transforms not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Host-transforms-not-working/m-p/459453#M79346</link>
      <description>&lt;P&gt;@ddrillic &lt;/P&gt;

&lt;P&gt;I was looking for the entire FQDN that would start with ies, wv or inn.&lt;/P&gt;

&lt;P&gt;thanks&lt;BR /&gt;
ed&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 21:36:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Host-transforms-not-working/m-p/459453#M79346</guid>
      <dc:creator>edwardrose</dc:creator>
      <dc:date>2019-05-15T21:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: Host transforms not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Host-transforms-not-working/m-p/459454#M79347</link>
      <description>&lt;P&gt;Your regex is technically correct, but the example shows &lt;CODE&gt;"(?&amp;lt;host&amp;gt;[ies|wv|inn].*.mentorg.com)"&lt;/CODE&gt; as regex where it will capture either its,wv, or inn followed by anything followed by mentors.com. In other words it captures the FQDN not just the host. &lt;/P&gt;

&lt;P&gt;Does that make sense?&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 21:37:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Host-transforms-not-working/m-p/459454#M79347</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2019-05-15T21:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: Host transforms not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Host-transforms-not-working/m-p/459455#M79348</link>
      <description>&lt;P&gt;Perfect @MuS ; -)&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 21:41:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Host-transforms-not-working/m-p/459455#M79348</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2019-05-15T21:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: Host transforms not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Host-transforms-not-working/m-p/459456#M79349</link>
      <description>&lt;P&gt;Got it, great @edwardrose - good luck and keep us posted. &lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 21:43:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Host-transforms-not-working/m-p/459456#M79349</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2019-05-15T21:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: Host transforms not working</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Host-transforms-not-working/m-p/459457#M79350</link>
      <description>&lt;P&gt;Thanks, converted to answer - feel free to accept it &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2019 22:00:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Host-transforms-not-working/m-p/459457#M79350</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2019-05-15T22:00:50Z</dc:date>
    </item>
  </channel>
</rss>

