<?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 After configuring props and transforms to extract the host from events, why are no results returned searching the host field? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/After-configuring-props-and-transforms-to-extract-the-host-from/m-p/179455#M36005</link>
    <description>&lt;P&gt;Hi Forum,&lt;/P&gt;

&lt;P&gt;i'm dealing with collectd data. This data generates events looking like this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;hostname.cpu-0.cpu-wait 0 1426497157
hostname.cpu-0.cpu-idle 99.25 1426497157
hostname.cpu-0.cpu-system 0.03 1426497157
hostname.cpu-0.cpu-nice 0 1426497157
hostname.cpu-0.cpu-user 0 1426497157
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;format it hostname.instance.metric value timestamp&lt;/P&gt;

&lt;P&gt;As all data is piped into Splunk using udp import, I'm extracting the hostname from the event using props.conf and transforms.conf &lt;BR /&gt;
write it to metadata:host.&lt;/P&gt;

&lt;P&gt;props.conf: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[collectd]
TIME_PREFIX = ^.+\..+\..+\s.+\s
TRANSFORMS-mask= mask-collectd
SHOULD_LINEMERGE=false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[mask-collectd]
REGEX = ^([^\.]+)\..+\..+\s.+\s.+
DEST_KEY = MetaData:Host
FORMAT = $1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;All Data is located in Index collectd. When doing a search (e.g.: &lt;CODE&gt;index=collectd&lt;/CODE&gt;) it shows me the hosts from the events at field hosts. &lt;BR /&gt;
When doing a search with &lt;CODE&gt;index=collectd host=*&lt;/CODE&gt; I don't get back any(!) results. Even when clicking the field and choosing a hostname.&lt;/P&gt;

&lt;P&gt;when using the metadata command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| metadata type=hosts index=collectd 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get the hostnames from the event again.&lt;BR /&gt;
For me it looks like only in some kind of metadata the hostname is rewritten. The search result shows the correct host field, but it's not usable. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Any hints and best regards,&lt;/P&gt;

&lt;P&gt;Andreas&lt;/P&gt;</description>
    <pubDate>Wed, 18 Mar 2015 07:05:11 GMT</pubDate>
    <dc:creator>schose</dc:creator>
    <dc:date>2015-03-18T07:05:11Z</dc:date>
    <item>
      <title>After configuring props and transforms to extract the host from events, why are no results returned searching the host field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/After-configuring-props-and-transforms-to-extract-the-host-from/m-p/179455#M36005</link>
      <description>&lt;P&gt;Hi Forum,&lt;/P&gt;

&lt;P&gt;i'm dealing with collectd data. This data generates events looking like this: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;hostname.cpu-0.cpu-wait 0 1426497157
hostname.cpu-0.cpu-idle 99.25 1426497157
hostname.cpu-0.cpu-system 0.03 1426497157
hostname.cpu-0.cpu-nice 0 1426497157
hostname.cpu-0.cpu-user 0 1426497157
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;format it hostname.instance.metric value timestamp&lt;/P&gt;

&lt;P&gt;As all data is piped into Splunk using udp import, I'm extracting the hostname from the event using props.conf and transforms.conf &lt;BR /&gt;
write it to metadata:host.&lt;/P&gt;

&lt;P&gt;props.conf: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[collectd]
TIME_PREFIX = ^.+\..+\..+\s.+\s
TRANSFORMS-mask= mask-collectd
SHOULD_LINEMERGE=false
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[mask-collectd]
REGEX = ^([^\.]+)\..+\..+\s.+\s.+
DEST_KEY = MetaData:Host
FORMAT = $1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;All Data is located in Index collectd. When doing a search (e.g.: &lt;CODE&gt;index=collectd&lt;/CODE&gt;) it shows me the hosts from the events at field hosts. &lt;BR /&gt;
When doing a search with &lt;CODE&gt;index=collectd host=*&lt;/CODE&gt; I don't get back any(!) results. Even when clicking the field and choosing a hostname.&lt;/P&gt;

&lt;P&gt;when using the metadata command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| metadata type=hosts index=collectd 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I get the hostnames from the event again.&lt;BR /&gt;
For me it looks like only in some kind of metadata the hostname is rewritten. The search result shows the correct host field, but it's not usable. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Any hints and best regards,&lt;/P&gt;

&lt;P&gt;Andreas&lt;/P&gt;</description>
      <pubDate>Wed, 18 Mar 2015 07:05:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/After-configuring-props-and-transforms-to-extract-the-host-from/m-p/179455#M36005</guid>
      <dc:creator>schose</dc:creator>
      <dc:date>2015-03-18T07:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: After configuring props and transforms to extract the host from events, why are no results returned searching the host field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/After-configuring-props-and-transforms-to-extract-the-host-from/m-p/179456#M36006</link>
      <description>&lt;P&gt;Use only props.conf in your app directory. try this following stanza:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[my_sourcefile]
EXTRACT-extract_hostname =( ?&amp;lt;hostname&amp;gt; ^([^.]+)..+..+s.+s.+)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 Mar 2015 11:26:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/After-configuring-props-and-transforms-to-extract-the-host-from/m-p/179456#M36006</guid>
      <dc:creator>tachifelix</dc:creator>
      <dc:date>2015-03-18T11:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: After configuring props and transforms to extract the host from events, why are no results returned searching the host field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/After-configuring-props-and-transforms-to-extract-the-host-from/m-p/179457#M36007</link>
      <description>&lt;P&gt;yes, but then i would create a new field hostname. I want to replace the field "host". &lt;/P&gt;

&lt;P&gt;background: the app is used in different enviroments. some environment have proper reverse dns resolution, some have not. For those who haven't i want to extract the hostname from the event. This is also done for sourcetype syslog in default.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Mar 2015 12:40:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/After-configuring-props-and-transforms-to-extract-the-host-from/m-p/179457#M36007</guid>
      <dc:creator>schose</dc:creator>
      <dc:date>2015-03-18T12:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: After configuring props and transforms to extract the host from events, why are no results returned searching the host field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/After-configuring-props-and-transforms-to-extract-the-host-from/m-p/179458#M36008</link>
      <description>&lt;P&gt;Try this in transforms.conf (props.can remain same)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[mask-collectd]
REGEX = ^([^\.]+)\..+\..+\s.+\s.+
DEST_KEY = MetaData:Host
FORMAT = host::$1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 18 Mar 2015 18:06:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/After-configuring-props-and-transforms-to-extract-the-host-from/m-p/179458#M36008</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-03-18T18:06:22Z</dc:date>
    </item>
    <item>
      <title>Re: After configuring props and transforms to extract the host from events, why are no results returned searching the host field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/After-configuring-props-and-transforms-to-extract-the-host-from/m-p/179459#M36009</link>
      <description>&lt;P&gt;yes, perfect forgot the "host::" at FORMAT = ... thx, wouldn't find it for my own! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Mar 2015 12:30:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/After-configuring-props-and-transforms-to-extract-the-host-from/m-p/179459#M36009</guid>
      <dc:creator>schose</dc:creator>
      <dc:date>2015-03-20T12:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: After configuring props and transforms to extract the host from events, why are no results returned searching the host field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/After-configuring-props-and-transforms-to-extract-the-host-from/m-p/179460#M36010</link>
      <description>&lt;P&gt;hi SomeSoni .. &lt;/P&gt;

&lt;P&gt;can you help me with similar problem - &lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/491154/how-to-configure-setting-the-host-field-during-ind.html"&gt;https://answers.splunk.com/answers/491154/how-to-configure-setting-the-host-field-during-ind.html&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2017 00:07:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/After-configuring-props-and-transforms-to-extract-the-host-from/m-p/179460#M36010</guid>
      <dc:creator>nmohammed</dc:creator>
      <dc:date>2017-01-27T00:07:05Z</dc:date>
    </item>
  </channel>
</rss>

