<?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: hostname regex path help in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/hostname-regex-path-help/m-p/97560#M25184</link>
    <description>&lt;P&gt;This is a good job for &lt;CODE&gt;host_regex&lt;/CODE&gt;, which is an option in &lt;CODE&gt;inputs.conf&lt;/CODE&gt;.  A &lt;CODE&gt;host_regex&lt;/CODE&gt; similar to this should work for newly indexed data.  (It won't fix previously indexed data is my point)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///home/user/files]
host_regex=^/home/user/files/([^_]+)_\d+\.log$
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 20 Mar 2012 21:31:23 GMT</pubDate>
    <dc:creator>dwaddle</dc:creator>
    <dc:date>2012-03-20T21:31:23Z</dc:date>
    <item>
      <title>hostname regex path help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/hostname-regex-path-help/m-p/97558#M25182</link>
      <description>&lt;P&gt;I have files in a directory like this:&lt;BR /&gt;
/home/user/files/servername_01020304050607.log &lt;BR /&gt;
How can I get the servername only?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Mar 2012 20:45:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/hostname-regex-path-help/m-p/97558#M25182</guid>
      <dc:creator>tiernan</dc:creator>
      <dc:date>2012-03-20T20:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: hostname regex path help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/hostname-regex-path-help/m-p/97559#M25183</link>
      <description>&lt;P&gt;This should do it:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;^/\w+/\w+/\w+/(?&amp;lt;server&amp;gt;\w+)_
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Mar 2012 21:28:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/hostname-regex-path-help/m-p/97559#M25183</guid>
      <dc:creator>sbrant_tt</dc:creator>
      <dc:date>2012-03-20T21:28:49Z</dc:date>
    </item>
    <item>
      <title>Re: hostname regex path help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/hostname-regex-path-help/m-p/97560#M25184</link>
      <description>&lt;P&gt;This is a good job for &lt;CODE&gt;host_regex&lt;/CODE&gt;, which is an option in &lt;CODE&gt;inputs.conf&lt;/CODE&gt;.  A &lt;CODE&gt;host_regex&lt;/CODE&gt; similar to this should work for newly indexed data.  (It won't fix previously indexed data is my point)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[monitor:///home/user/files]
host_regex=^/home/user/files/([^_]+)_\d+\.log$
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 20 Mar 2012 21:31:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/hostname-regex-path-help/m-p/97560#M25184</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2012-03-20T21:31:23Z</dc:date>
    </item>
  </channel>
</rss>

