<?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: how to join 2 log files  using splunk in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-join-2-log-files-using-splunk/m-p/77074#M19498</link>
    <description>&lt;P&gt;I will try this approach and update accordingly&lt;/P&gt;</description>
    <pubDate>Fri, 04 Jan 2013 05:42:31 GMT</pubDate>
    <dc:creator>infyravi</dc:creator>
    <dc:date>2013-01-04T05:42:31Z</dc:date>
    <item>
      <title>how to join 2 log files  using splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-join-2-log-files-using-splunk/m-p/77071#M19495</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
 I am having 2 log files like this&lt;BR /&gt;
 1) abc.log&lt;BR /&gt;
 2) master.log&lt;/P&gt;

&lt;P&gt;In the master.log I am having master data like&lt;/P&gt;

&lt;P&gt;URI=/ABC/HOME | Name=LandingPage | SLA=10&lt;BR /&gt;
URI=/ABC/SOMETRANSACTION| Name=XYZ | SLA=10&lt;/P&gt;

&lt;P&gt;In ABC.LOG file I am having entries like this&lt;BR /&gt;
URI=/ABC/home|TT=10|CLS=ABC&lt;BR /&gt;
URI=/ABC/home|TT=20|CLS=ABC&lt;BR /&gt;
URI=/ABC/SOMETRANSACTION|TT=20|CLS=CDER&lt;/P&gt;

&lt;P&gt;Now I want to create a report like this&lt;/P&gt;

&lt;H2&gt;Business Txn   ----&amp;gt;       Volume  -----&amp;gt;            Average Response time---&amp;gt;            SLA&lt;/H2&gt;

&lt;P&gt;Landing page  -----&amp;gt;         2   ----------&amp;gt;                        15      ------&amp;gt;                  RED&lt;/P&gt;

&lt;P&gt;XYZ          ------&amp;gt;                1    -----&amp;gt;                       20    -----&amp;gt;                      RED&lt;/P&gt;

&lt;P&gt;It means the URI should be shown as Name value from master.log file and it should also do the&lt;BR /&gt;
count of number of occurences along with Average and SLA calculation.&lt;/P&gt;

&lt;P&gt;Landing page should come as hyperlink so that when clicked it should show all landing page related transactions in another table.&lt;/P&gt;

&lt;P&gt;Can anyone let me know how we can achieve this.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2013 17:43:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-join-2-log-files-using-splunk/m-p/77071#M19495</guid>
      <dc:creator>infyravi</dc:creator>
      <dc:date>2013-01-03T17:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to join 2 log files  using splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-join-2-log-files-using-splunk/m-p/77072#M19496</link>
      <description>&lt;P&gt;is the master.log really a log file? It seems a little bit like a table of acceptable SLA's per URL. In that case it may prove beneficial to use the master log as a lookup table. See the docs on lookup tables.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2013 22:36:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-join-2-log-files-using-splunk/m-p/77072#M19496</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-01-03T22:36:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to join 2 log files  using splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-join-2-log-files-using-splunk/m-p/77073#M19497</link>
      <description>&lt;P&gt;The approach I would try first is: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="abc.log" OR source="master.log" | stats last(SLA) as SLA last(Name) as Name last max(TT) as maxTT avg(TT) as avgTT by URI 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can use the eval or rangemap commands to get you your Red/Yellow/Green column,  and you may want/need to use eval to do more massaging with eval etc.   but that will give you the basic idea.   &lt;/P&gt;

&lt;P&gt;Beware the &lt;CODE&gt;join&lt;/CODE&gt; command. Users new to Splunk often overuse the &lt;CODE&gt;join&lt;/CODE&gt; and &lt;CODE&gt;append&lt;/CODE&gt; commands because the metaphor matches what they are familiar with from SQL. However it's almost always  better to use lookups, eval+stats or transaction.   Think of the join and append commands as last resorts - square SQL pegs in a round Splunk world. &lt;/P&gt;

&lt;P&gt;Here's a flow chart I made a long time ago that attempts to help you through all this. &lt;A href="http://sideviewapps.com/misc/grouping_flow_chart.png"&gt;http://sideviewapps.com/misc/grouping_flow_chart.png&lt;/A&gt;  &lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2013 22:45:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-join-2-log-files-using-splunk/m-p/77073#M19497</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2013-01-03T22:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: how to join 2 log files  using splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-join-2-log-files-using-splunk/m-p/77074#M19498</link>
      <description>&lt;P&gt;I will try this approach and update accordingly&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jan 2013 05:42:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-join-2-log-files-using-splunk/m-p/77074#M19498</guid>
      <dc:creator>infyravi</dc:creator>
      <dc:date>2013-01-04T05:42:31Z</dc:date>
    </item>
  </channel>
</rss>

