<?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: Combining fields pre-search in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Combining-fields-pre-search/m-p/34651#M6266</link>
    <description>&lt;P&gt;Thanks.  I'm having issues getting this to work as an automatic lookup.  I've got the CSV file up, doing something simple like:&lt;/P&gt;

&lt;P&gt;vhost,old&lt;BR /&gt;
&lt;A href="http://www.domain.com,origin-www.domain.com"&gt;www.domain.com,origin-www.domain.com&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://www.domain2.com,origin-www.domain2.com"&gt;www.domain2.com,origin-www.domain2.com&lt;/A&gt;&lt;BR /&gt;
etc&lt;/P&gt;

&lt;P&gt;I've got the appropriate definitions configured, and my lookups are basic:&lt;BR /&gt;
input:&lt;BR /&gt;
vhost=vhost&lt;/P&gt;

&lt;P&gt;output:&lt;BR /&gt;
old=old&lt;/P&gt;

&lt;P&gt;I'm not seeing either new field show up in the search results, and there are no replacements being made.&lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;</description>
    <pubDate>Thu, 16 May 2013 18:22:56 GMT</pubDate>
    <dc:creator>foomanjee</dc:creator>
    <dc:date>2013-05-16T18:22:56Z</dc:date>
    <item>
      <title>Combining fields pre-search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Combining-fields-pre-search/m-p/34648#M6263</link>
      <description>&lt;P&gt;Hello, I have what may or may not be a bit of a unique issue regarding extracted fields.&lt;/P&gt;

&lt;P&gt;We've got a few webservers and we use a relatively unique custom log format, so I've had to manually extract fields.  One of the fields is the HTTP header hostname that Apache sees.&lt;/P&gt;

&lt;P&gt;The issue is this: We have several sites with multiple hostnames that all serve the same content.  For example:&lt;BR /&gt;
&lt;A href="http://www.domain.com"&gt;www.domain.com&lt;/A&gt;&lt;BR /&gt;
origin-&lt;A href="http://www.domain.com"&gt;www.domain.com&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;The CustomLog in Apache shows both hostnames in their respective log lines, so Splunk does as well.&lt;/P&gt;

&lt;P&gt;This results in our Splunk generated graphs showing both fields separately, rather than combined, which results in incorrect numbers (hits/sec, etc).&lt;/P&gt;

&lt;P&gt;What I need is to combine those two.  In other words, I want splunk to combine the origin-&lt;A href="http://www.domain.com"&gt;www.domain.com&lt;/A&gt; field with the &lt;A href="http://www.domain.com"&gt;www.domain.com&lt;/A&gt; field.&lt;/P&gt;

&lt;P&gt;Any ideas on how this can be done?&lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2013 15:06:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Combining-fields-pre-search/m-p/34648#M6263</guid>
      <dc:creator>foomanjee</dc:creator>
      <dc:date>2013-05-15T15:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Combining fields pre-search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Combining-fields-pre-search/m-p/34649#M6264</link>
      <description>&lt;P&gt;One simple way is that before you transform the data with stats/chart/timechart,   just clean it up a little with eval.   &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| eval host=replace(host,"origin-www.","www.")&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;If there are many different ways in which duplicates exist,  but the list is relatively stable over time another tool you might use is a lookup,   to map each duplicate hostname to the main one.   &lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2013 18:01:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Combining-fields-pre-search/m-p/34649#M6264</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-05-15T18:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: Combining fields pre-search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Combining-fields-pre-search/m-p/34650#M6265</link>
      <description>&lt;P&gt;One simple way is that before you transform the data with stats/chart/timechart,   just clean it up a little with eval.   &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| eval host=replace(host,"origin-www.","www.")&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;If there are many different ways in which duplicates exist,  but the list is relatively stable over time another tool you might use is a lookup,   to map each duplicate hostname to the main one.   &lt;/P&gt;</description>
      <pubDate>Wed, 15 May 2013 18:01:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Combining-fields-pre-search/m-p/34650#M6265</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-05-15T18:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: Combining fields pre-search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Combining-fields-pre-search/m-p/34651#M6266</link>
      <description>&lt;P&gt;Thanks.  I'm having issues getting this to work as an automatic lookup.  I've got the CSV file up, doing something simple like:&lt;/P&gt;

&lt;P&gt;vhost,old&lt;BR /&gt;
&lt;A href="http://www.domain.com,origin-www.domain.com"&gt;www.domain.com,origin-www.domain.com&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://www.domain2.com,origin-www.domain2.com"&gt;www.domain2.com,origin-www.domain2.com&lt;/A&gt;&lt;BR /&gt;
etc&lt;/P&gt;

&lt;P&gt;I've got the appropriate definitions configured, and my lookups are basic:&lt;BR /&gt;
input:&lt;BR /&gt;
vhost=vhost&lt;/P&gt;

&lt;P&gt;output:&lt;BR /&gt;
old=old&lt;/P&gt;

&lt;P&gt;I'm not seeing either new field show up in the search results, and there are no replacements being made.&lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2013 18:22:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Combining-fields-pre-search/m-p/34651#M6266</guid>
      <dc:creator>foomanjee</dc:creator>
      <dc:date>2013-05-16T18:22:56Z</dc:date>
    </item>
    <item>
      <title>Re: Combining fields pre-search</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Combining-fields-pre-search/m-p/34652#M6267</link>
      <description>&lt;P&gt;I should add that I've already got a field called 'vhost'.  What I'm trying to do is search for vhost=&lt;A href="http://www.domain.com"&gt;www.domain.com&lt;/A&gt;, and have it show both &lt;A href="http://www.domain.com"&gt;www.domain.com&lt;/A&gt; and origin-&lt;A href="http://www.domain.com"&gt;www.domain.com&lt;/A&gt; entries, without having to use "replace".  I have about 50 domains, so using "replace" would be rather ugly.&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2013 18:49:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Combining-fields-pre-search/m-p/34652#M6267</guid>
      <dc:creator>foomanjee</dc:creator>
      <dc:date>2013-05-16T18:49:45Z</dc:date>
    </item>
  </channel>
</rss>

