<?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 override issues in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Host-override-issues/m-p/52455#M10099</link>
    <description>&lt;P&gt;What is currently in your props.conf and transforms.conf &lt;EM&gt;should&lt;/EM&gt; work - these files should be on all of your indexers.&lt;/P&gt;

&lt;P&gt;However, you could also do this more easily on the forwarder using &lt;CODE&gt;inputs.conf&lt;/CODE&gt;. This solution is also much more efficient.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor://yourinputhere]
host_regex = /hosts/(?&amp;lt;hostname&amp;gt;[^/]+)/logs/
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;More info &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Admin/Inputsconf"&gt;here&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 03 Dec 2012 19:43:57 GMT</pubDate>
    <dc:creator>lguinn2</dc:creator>
    <dc:date>2012-12-03T19:43:57Z</dc:date>
    <item>
      <title>Host override issues</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Host-override-issues/m-p/52454#M10098</link>
      <description>&lt;P&gt;I am trying to override the host field based on an element in the source path. This is data that is being forwarded from a universal forwarder and we want the host the data originally came from as the host field, not the hostname of the forwarder.&lt;/P&gt;

&lt;P&gt;To date, I have tried modifying etc/system/local/transforms.conf and props.conf both on the indexers and in the search app on our search heads; all with no luck. I have also tried various values in transforms.conf ranging from both MetaData:Source and source for SOURCE_KEY and using source:: in the regex. Anyone have any ideas what I'm doing wrong?&lt;/P&gt;

&lt;P&gt;Here is what is currently in transforms.conf and props.conf:&lt;BR /&gt;
transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[set-host-elasticsearch]
SOURCE_KEY = MetaData:Source
REGEX = /hosts/([^/]+)/logs/
DEST_KEY = MetaData:Host
FORMAT = host::$1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[elasticsearch]
TRANSFORMS-set-host-elasticsearch = set-host-elasticsearch
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The regex works fine in a search, I can run the following and get a table of hosts:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=elasticsearch | rex field=source "/hosts/(?&amp;lt;hostname&amp;gt;[^/]+)/logs/" | stats count by hostname
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;As an example, my source path might be something like: &lt;BR /&gt;
/rel/ps/applications/elasticsearch/hosts/tvrap571/logs/test_cre_gld.log&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:54:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Host-override-issues/m-p/52454#M10098</guid>
      <dc:creator>wwwdrich</dc:creator>
      <dc:date>2020-09-28T12:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: Host override issues</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Host-override-issues/m-p/52455#M10099</link>
      <description>&lt;P&gt;What is currently in your props.conf and transforms.conf &lt;EM&gt;should&lt;/EM&gt; work - these files should be on all of your indexers.&lt;/P&gt;

&lt;P&gt;However, you could also do this more easily on the forwarder using &lt;CODE&gt;inputs.conf&lt;/CODE&gt;. This solution is also much more efficient.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor://yourinputhere]
host_regex = /hosts/(?&amp;lt;hostname&amp;gt;[^/]+)/logs/
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;More info &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Admin/Inputsconf"&gt;here&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Dec 2012 19:43:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Host-override-issues/m-p/52455#M10099</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-12-03T19:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: Host override issues</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Host-override-issues/m-p/52456#M10100</link>
      <description>&lt;P&gt;These are universal forwarders, I thought they didn't support any manipulation of the data? I'll have to give that a try, since the forwarder configs are managed via. the deployment server it's an easy fix. I'll add a comment with how it goes.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2012 15:38:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Host-override-issues/m-p/52456#M10100</guid>
      <dc:creator>wwwdrich</dc:creator>
      <dc:date>2012-12-04T15:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: Host override issues</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Host-override-issues/m-p/52457#M10101</link>
      <description>&lt;P&gt;Great news, that works!! Thanks for the tip, I didn't think it would honor that on the forwarders.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2012 17:20:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Host-override-issues/m-p/52457#M10101</guid>
      <dc:creator>wwwdrich</dc:creator>
      <dc:date>2012-12-04T17:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: Host override issues</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Host-override-issues/m-p/52458#M10102</link>
      <description>&lt;P&gt;Here's the deal - a Universal Forwarder (UF) does not do &lt;EM&gt;parsing&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;However, if you assign a sourcetype or host to the &lt;EM&gt;entire data stream&lt;/EM&gt; in &lt;STRONG&gt;inputs.conf&lt;/STRONG&gt;, that works. Because the UF doesn't have to parse anything to do it. You can even set values in props.conf on the UF - as long as you are referring to properties that apply at input time and require no parsing. For example, you can override the automatic sourcetype of a source in &lt;STRONG&gt;props.conf&lt;/STRONG&gt; on the UF.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2012 21:29:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Host-override-issues/m-p/52458#M10102</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-12-04T21:29:31Z</dc:date>
    </item>
  </channel>
</rss>

