<?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_Regex help in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/host-Regex-help/m-p/124833#M184282</link>
    <description>&lt;P&gt;Then you'll want to create a transforms.conf stanza with a '&lt;CODE&gt;REGEX = [.]*\.(?&amp;lt;host&amp;gt;[^\.]+?)\.(?&amp;lt;date&amp;gt;[^\.]*?)\.(?&amp;lt;time&amp;gt;[^\.]*?)&lt;/CODE&gt;' statement.&lt;/P&gt;</description>
    <pubDate>Fri, 24 Jan 2014 14:05:01 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2014-01-24T14:05:01Z</dc:date>
    <item>
      <title>host_Regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/host-Regex-help/m-p/124830#M184279</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I want to name my host based upon a value in the logfile.  I know it can be done via regex but it's not working.  &lt;/P&gt;

&lt;P&gt;The name of the files are like this...&lt;/P&gt;

&lt;P&gt;SG_HTTP.AGW-US123-PLUG.140124.122345.log.gz&lt;BR /&gt;
SG_HTTP.AGW-US301-PLUG.140124.122345.log.gz&lt;/P&gt;

&lt;P&gt;my host regex is  = (IGW+[a-zA-Z0-9_])&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:42:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/host-Regex-help/m-p/124830#M184279</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2020-09-28T15:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: host_Regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/host-Regex-help/m-p/124831#M184280</link>
      <description>&lt;P&gt;Assuming the host name is between the first two dots, this may work for you.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;'rex "[.]*\.(?&amp;lt;host&amp;gt;[^.]+?)\.[.]*"'&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2014 13:53:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/host-Regex-help/m-p/124831#M184280</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2014-01-24T13:53:57Z</dc:date>
    </item>
    <item>
      <title>Re: host_Regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/host-Regex-help/m-p/124832#M184281</link>
      <description>&lt;P&gt;I'm looking to to this in the inputs.conf, not the search bar.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2014 13:58:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/host-Regex-help/m-p/124832#M184281</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2014-01-24T13:58:05Z</dc:date>
    </item>
    <item>
      <title>Re: host_Regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/host-Regex-help/m-p/124833#M184282</link>
      <description>&lt;P&gt;Then you'll want to create a transforms.conf stanza with a '&lt;CODE&gt;REGEX = [.]*\.(?&amp;lt;host&amp;gt;[^\.]+?)\.(?&amp;lt;date&amp;gt;[^\.]*?)\.(?&amp;lt;time&amp;gt;[^\.]*?)&lt;/CODE&gt;' statement.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2014 14:05:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/host-Regex-help/m-p/124833#M184282</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2014-01-24T14:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: host_Regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/host-Regex-help/m-p/124834#M184283</link>
      <description>&lt;P&gt;If AGW-US123-PLUG is the host name from the file name, use this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;\.([-a-zA-Z0-9]+)\.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If just US123-PLUG is the host name , use this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;-([-a-zA-Z0-9]+)\.

E.g. inputs.conf
[monitor://&amp;lt;path&amp;gt;]
host_regex = &amp;lt;your_regex&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 24 Jan 2014 17:35:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/host-Regex-help/m-p/124834#M184283</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-01-24T17:35:48Z</dc:date>
    </item>
  </channel>
</rss>

