<?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: relating fields in multiple log format in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/relating-fields-in-multiple-log-format/m-p/131699#M35931</link>
    <description>&lt;P&gt;You'll want to combine those events into a transaction:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=whatever and other filters for your events | transaction sid maxspan=1s | timechart avg(rt) by SWEService
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Similarly you can run other reports, such as &lt;CODE&gt;| timechart values(user) by SWEService&lt;/CODE&gt;. I've assumed all events for one transaction happen at roughly the same time with &lt;CODE&gt;maxspan=1s&lt;/CODE&gt;, that may or may not be correct for your case - adjust the span as required, or look at the other settings at &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.2/SearchReference/Transaction"&gt;http://docs.splunk.com/Documentation/Splunk/6.1.2/SearchReference/Transaction&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;That's assuming you already have the relevant fields extracted. &lt;CODE&gt;rt&lt;/CODE&gt;, &lt;CODE&gt;sid&lt;/CODE&gt;, and &lt;CODE&gt;SWEService&lt;/CODE&gt; should be auto-extracted, you'd probably need a regular expression for the user, e.g. &lt;CODE&gt;^\&amp;lt;132\&amp;gt;[^|]+\|(?&amp;lt;user&amp;gt;[^|]+)&lt;/CODE&gt;.&lt;/P&gt;</description>
    <pubDate>Sun, 06 Jul 2014 13:16:38 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2014-07-06T13:16:38Z</dc:date>
    <item>
      <title>relating fields in multiple log format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/relating-fields-in-multiple-log-format/m-p/131698#M35930</link>
      <description>&lt;P&gt;I have the following three different types of logs coming into a single source-type&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;189&amp;gt;Jul 06 15:38:54|100.888.94.888|sport=64920|sid=11635419210657705766|XX.XX.XX.XX|80|rt=9

&amp;lt;190&amp;gt;Jul 06 15:38:54|10.39.192.90|100.888.94.888|sport=64920|sid=11635419210657705766|Mozilla/5.0 (Windows NT 5.1; rv:30.0) Gecko/20100101 Firefox/30.0||SWEBS=1&amp;amp;SWECmd=InvokeMethod&amp;amp;SWEService=Message+Bar&amp;amp;SWEMethod=UpdatePrefMsg&amp;amp;SWEIPS=%400%600%601%600%60%603%60%60SWEBS%601%60&amp;amp;SWERPC=1&amp;amp;SRN=clPdw5go7eScsXlZ5zpUAlw4LuUxc1dUg1JRlUYnw8gb&amp;amp;SWEC=30&amp;amp;SWETS=1404625134263

&amp;lt;132&amp;gt;Jul 6 15:38:54 lbs241-mgt.com.au ASM:2014-07-06 15:38:54|THISISUSERNAME|ssid=c93ffac13b7f4368|sport=64920|sid=11635419210657705766|100.888.94.888|10.39.192.90|POST|/ppopenui/start.swe&amp;lt;SWECmd=InvokeMethod&amp;gt;|200|alerted
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;a) How do i relate using the "sid" :- for example for SWEService="Message*" the response time is in the line starting with "&amp;lt;189&amp;gt;" in the field "rt=" and the User who invoked this is in the line starting with "&amp;lt;132&amp;gt;" where  i have put "THISISUSERNAME"(note there is no field name for username.) &lt;/P&gt;

&lt;P&gt;Note:- All the three lines have constant formatting i.e. its a pipe delimited log file  with specific values in each fields.&lt;BR /&gt;
Also "&amp;lt;180&amp;gt;" , "&amp;lt;190&amp;gt;","&amp;lt;132&amp;gt;" are constant values that distinguishes the three type of logs.&lt;/P&gt;

&lt;P&gt;What i am trying to do is to find the Avg response time(i.e. rt) plus another report of which user has viewed with SWEService&lt;/P&gt;

&lt;P&gt;Appreciate help. &lt;BR /&gt;
REgards Irfan&lt;/P&gt;</description>
      <pubDate>Sun, 06 Jul 2014 08:32:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/relating-fields-in-multiple-log-format/m-p/131698#M35930</guid>
      <dc:creator>irfy</dc:creator>
      <dc:date>2014-07-06T08:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: relating fields in multiple log format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/relating-fields-in-multiple-log-format/m-p/131699#M35931</link>
      <description>&lt;P&gt;You'll want to combine those events into a transaction:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype=whatever and other filters for your events | transaction sid maxspan=1s | timechart avg(rt) by SWEService
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Similarly you can run other reports, such as &lt;CODE&gt;| timechart values(user) by SWEService&lt;/CODE&gt;. I've assumed all events for one transaction happen at roughly the same time with &lt;CODE&gt;maxspan=1s&lt;/CODE&gt;, that may or may not be correct for your case - adjust the span as required, or look at the other settings at &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.1.2/SearchReference/Transaction"&gt;http://docs.splunk.com/Documentation/Splunk/6.1.2/SearchReference/Transaction&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;That's assuming you already have the relevant fields extracted. &lt;CODE&gt;rt&lt;/CODE&gt;, &lt;CODE&gt;sid&lt;/CODE&gt;, and &lt;CODE&gt;SWEService&lt;/CODE&gt; should be auto-extracted, you'd probably need a regular expression for the user, e.g. &lt;CODE&gt;^\&amp;lt;132\&amp;gt;[^|]+\|(?&amp;lt;user&amp;gt;[^|]+)&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Sun, 06 Jul 2014 13:16:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/relating-fields-in-multiple-log-format/m-p/131699#M35931</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-07-06T13:16:38Z</dc:date>
    </item>
  </channel>
</rss>

