<?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 Field Extraction - restrict extraction to - can this be changed? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Field-Extraction-restrict-extraction-to-can-this-be-changed/m-p/27601#M5376</link>
    <description>&lt;P&gt;Field extraction appears to be restricted to Host, Source or sourcetype - I have multiple web servers, and even web services running on the same server - but they all generate different sourcetypes. &lt;BR /&gt;
Currently I create a Field Extraction per source, but want to know if I can make this more generic and use it across any IIS log. All the logs are given different sourcetype names, to differentiate at search level.&lt;BR /&gt;
has anyone used the Splunk app for web Intelligence? would this assist?&lt;/P&gt;</description>
    <pubDate>Mon, 16 Apr 2012 15:43:29 GMT</pubDate>
    <dc:creator>gerald_huddlest</dc:creator>
    <dc:date>2012-04-16T15:43:29Z</dc:date>
    <item>
      <title>Field Extraction - restrict extraction to - can this be changed?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-Extraction-restrict-extraction-to-can-this-be-changed/m-p/27601#M5376</link>
      <description>&lt;P&gt;Field extraction appears to be restricted to Host, Source or sourcetype - I have multiple web servers, and even web services running on the same server - but they all generate different sourcetypes. &lt;BR /&gt;
Currently I create a Field Extraction per source, but want to know if I can make this more generic and use it across any IIS log. All the logs are given different sourcetype names, to differentiate at search level.&lt;BR /&gt;
has anyone used the Splunk app for web Intelligence? would this assist?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Apr 2012 15:43:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-Extraction-restrict-extraction-to-can-this-be-changed/m-p/27601#M5376</guid>
      <dc:creator>gerald_huddlest</dc:creator>
      <dc:date>2012-04-16T15:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extraction - restrict extraction to - can this be changed?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-Extraction-restrict-extraction-to-can-this-be-changed/m-p/27602#M5377</link>
      <description>&lt;P&gt;Uh-oh. Perhaps I'm misunderstanding, but are you setting different sourcetypes for the same type of log file, depending on from which file you're reading?&lt;/P&gt;

&lt;P&gt;The best practice is to have the same sourcetype for a certain type of file, regardless of the path/host, e.g. all IIS log files should have sourcetype=iis. Then you can apply all your field extractions on a per sourcetype basis, rather on a per source basis.&lt;/P&gt;

&lt;P&gt;/k&lt;/P&gt;</description>
      <pubDate>Mon, 16 Apr 2012 15:59:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-Extraction-restrict-extraction-to-can-this-be-changed/m-p/27602#M5377</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2012-04-16T15:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extraction - restrict extraction to - can this be changed?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-Extraction-restrict-extraction-to-can-this-be-changed/m-p/27603#M5378</link>
      <description>&lt;P&gt;thanks for the response, you are correct. &lt;/P&gt;

&lt;P&gt;So on a given host, I have 5 web services running on 5 ports. Each outputs to a separate log directory and I have given them a different sourcetype so that I can easily search against a given source type - would you not recommend this?&lt;BR /&gt;
Surely my searches are then impacted as I will end up searching against logs for all web services rather than just the specific web service. &lt;BR /&gt;
Agreed they are the same type of log file.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Apr 2012 16:04:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-Extraction-restrict-extraction-to-can-this-be-changed/m-p/27603#M5378</guid>
      <dc:creator>gerald_huddlest</dc:creator>
      <dc:date>2012-04-16T16:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: Field Extraction - restrict extraction to - can this be changed?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Field-Extraction-restrict-extraction-to-can-this-be-changed/m-p/27604#M5379</link>
      <description>&lt;P&gt;The way to re-use your field extractions is by applying them at the sourcetype level. This also means that you should set the same sourcetype for all logs of the same type. &lt;/P&gt;

&lt;P&gt;While your setup may be better in some cases, this is probably not one of them, since you will have to maintain a bunch of identical field extractions. It may make more sense to change the host value, either through &lt;CODE&gt;host_segment&lt;/CODE&gt; or &lt;CODE&gt;host_regex&lt;/CODE&gt;, so that each website gets a unique host name as seen from splunk. You can look this up in the docs for &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Admin/Inputsconf"&gt;inputs.conf&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Or you could limit searches on the source when you want to differentiate between them, e.g.;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=iis source=*W3SVC4* | the_rest_of_your_search
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this helps,&lt;/P&gt;

&lt;P&gt;Kristian&lt;/P&gt;</description>
      <pubDate>Mon, 16 Apr 2012 16:29:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Field-Extraction-restrict-extraction-to-can-this-be-changed/m-p/27604#M5379</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2012-04-16T16:29:59Z</dc:date>
    </item>
  </channel>
</rss>

