<?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 Help with Extracting host via transforms in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Help-with-Extracting-host-via-transforms/m-p/604500#M105125</link>
    <description>&lt;P&gt;We have the following -&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;# /data/xxxx/&amp;lt;hostname&amp;gt;_syslog.log
[datanow-syslog-host]
SOURCE_KEY = source
REGEX = \/data\/xxxx\/(.+)_syslog\.log
DEST_KEY = MetaData:Host
FORMAT = host::$1&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Trying to extract the host name from the source without much luck.&lt;BR /&gt;&lt;BR /&gt;Any ideas?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jul 2022 14:03:44 GMT</pubDate>
    <dc:creator>danielbb</dc:creator>
    <dc:date>2022-07-07T14:03:44Z</dc:date>
    <item>
      <title>Help with Extracting host via transforms</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-with-Extracting-host-via-transforms/m-p/604500#M105125</link>
      <description>&lt;P&gt;We have the following -&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;# /data/xxxx/&amp;lt;hostname&amp;gt;_syslog.log
[datanow-syslog-host]
SOURCE_KEY = source
REGEX = \/data\/xxxx\/(.+)_syslog\.log
DEST_KEY = MetaData:Host
FORMAT = host::$1&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Trying to extract the host name from the source without much luck.&lt;BR /&gt;&lt;BR /&gt;Any ideas?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 14:03:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-with-Extracting-host-via-transforms/m-p/604500#M105125</guid>
      <dc:creator>danielbb</dc:creator>
      <dc:date>2022-07-07T14:03:44Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting host via transforms</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-with-Extracting-host-via-transforms/m-p/604537#M105129</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/196884"&gt;@danielbb&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;the stanza you shared is in transforms.conf, I suppose that you also created a related props.conf containing:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[your_sourcetype]
TRANSFORMS-datanow-syslog-host = datanow-syslog-host&lt;/LI-CODE&gt;&lt;P&gt;and I suppose that the sourcetype is correct: there isn't any additional sourcetype overriding.&lt;/P&gt;&lt;P&gt;Then, where do you located props.conf and transforms.conf?&lt;/P&gt;&lt;P&gt;they must be on your Indexers or (if present) on Heavy Forwarders, not on Universal Forwarders.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 06:45:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-with-Extracting-host-via-transforms/m-p/604537#M105129</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-07-06T06:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting host via transforms</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-with-Extracting-host-via-transforms/m-p/604659#M105147</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In props.conf I have configuration as you said -&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[your_sourcetype]
TRANSFORMS-datanow-syslog-host = datanow-syslog-host&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And btool of props and transforms confirms that this part is ok.&lt;/P&gt;&lt;P&gt;Props and transforms are on the HF which is our syslog server as well.&lt;/P&gt;&lt;P&gt;Does this line look fine to you? the one I trust the least -&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SOURCE_KEY = source&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Is there any way to debug these cases? splunkd.log doesn't record much of it, right?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jul 2022 19:44:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-with-Extracting-host-via-transforms/m-p/604659#M105147</guid>
      <dc:creator>danielbb</dc:creator>
      <dc:date>2022-07-06T19:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting host via transforms</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-with-Extracting-host-via-transforms/m-p/604706#M105152</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/196884"&gt;@danielbb&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I suppose that you also restarted Splunk on the HF after update.&lt;/P&gt;&lt;P&gt;Anyway, teh configuration is correct, the only thing different than my usual use is the SOURCE_KEY = source, have you the value you are using also in the row events?.&lt;/P&gt;&lt;P&gt;Reading the documentation at&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/9.0.0/Admin/Transformsconf" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/9.0.0/Admin/Transformsconf&lt;/A&gt;&amp;nbsp;I see that the syntax to use is a little different, please try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SOURCE_KEY = MetaData:Source&lt;/LI-CODE&gt;&lt;P&gt;or&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;SOURCE_KEY = field:source&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jul 2022 06:31:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-with-Extracting-host-via-transforms/m-p/604706#M105152</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-07-07T06:31:30Z</dc:date>
    </item>
  </channel>
</rss>

