<?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: Creating a tabular result along with chart in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Creating-a-tabular-result-along-with-chart/m-p/315157#M58991</link>
    <description>&lt;P&gt;By &amp;lt;&amp;gt; I dont know what it means "your base search to fetch both request and response event"&lt;/P&gt;

&lt;P&gt;If I understand correctly my base search would be to look for the keyword: GetPSAccountInfoDefault in both response and request in addition to accountnumber , in request it is mentioned as 123456789 and in response it comes as ERROR: ETRGetPSAccountInfoDefault returned 0 records for account=123456789&lt;/P&gt;

&lt;P&gt;how do I translate the above search search criteria and then extract fields as I never extracted fields before and get my desired output&lt;/P&gt;</description>
    <pubDate>Mon, 22 Jan 2018 21:30:40 GMT</pubDate>
    <dc:creator>babidi</dc:creator>
    <dc:date>2018-01-22T21:30:40Z</dc:date>
    <item>
      <title>Creating a tabular result along with chart</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Creating-a-tabular-result-along-with-chart/m-p/315152#M58986</link>
      <description>&lt;P&gt;Hello Splunk Support Community:&lt;/P&gt;

&lt;P&gt;I am trying to find the difference between request and response from the log.&lt;/P&gt;

&lt;P&gt;For information purpose this is the request format:&lt;/P&gt;

&lt;P&gt;05 Jan 2018 16:45:19,951 -  INFO &lt;A href="Util.java:44"&gt;http-bio-8080-exec-409&lt;/A&gt; - 9999999: begin getAccountDefault()&lt;/P&gt;

&lt;P&gt;For information purpose this is the response format&lt;/P&gt;

&lt;P&gt;Jan  5 16:48:25 MyAccount ERROR: com.ebpsource.XYZ123Consumer.Customer0: - E0 00300 Customer0                 - ERROR: XYZGetAccountDefault returned  0 records for account=9999999 loginId=&lt;A href="mailto:xyz@abc.om"&gt;xyz@abc.om&lt;/A&gt; dateFrom=12/17/2017 dateTo=01/05/2018 doLinking=true isUDLAccount=false.&lt;/P&gt;

&lt;P&gt;What I am trying to achieve are following:&lt;/P&gt;

&lt;P&gt;(1)- Get the difference between the Response and Request i.e if you see you above the Request starts with 05 Jan 2018 16:45:19 and likewise Response contains : Jan  5 16:48:25 , I like to get the difference for these timestamps &lt;/P&gt;

&lt;P&gt;The End Result should look like in tabular format :&lt;/P&gt;

&lt;P&gt;Account Number  , Email Address, Function/Webservice Call Name, Request Time, Response Time, Difference&lt;BR /&gt;
9999999 , &lt;A href="mailto:xyz@abc.om"&gt;xyz@abc.om&lt;/A&gt;,getAccountDefault(),05 Jan 2018 16:45:19, Jan  5 16:48:25,3 minutes and 3 seconds&lt;/P&gt;

&lt;P&gt;The above result should be clickable to take it the log stack trace.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2018 20:07:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Creating-a-tabular-result-along-with-chart/m-p/315152#M58986</guid>
      <dc:creator>babidi</dc:creator>
      <dc:date>2018-01-12T20:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a tabular result along with chart</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Creating-a-tabular-result-along-with-chart/m-p/315153#M58987</link>
      <description>&lt;P&gt;Assuming you've all field extractions setup, try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;&amp;lt;your base search to fetch both request and response events&amp;gt;&amp;gt;
| fields _time Account_Number, Email_Address Webservice_Call_Name
| eval Request_Time=if(searchmatch("&amp;lt;&amp;lt;search terms for request&amp;gt;&amp;gt;"),strftime(_time,"%F %T"),null()
| eval Response_Time=if(isnull(Request_Time),strftime(_time,"%F %T"),null())
| stats values(*) as * range(_time) as Difference by Account_Number
| eval Difference=tostring(Difference,"duration")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To setup clickability and drilldown, refer to these links&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/SplunkCloud/6.6.3/Viz/DrilldownIntro"&gt;http://docs.splunk.com/Documentation/SplunkCloud/6.6.3/Viz/DrilldownIntro&lt;/A&gt;&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/SplunkCloud/6.6.3/AdvancedDev/TableChartDrilldown"&gt;https://docs.splunk.com/Documentation/SplunkCloud/6.6.3/AdvancedDev/TableChartDrilldown&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2018 20:48:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Creating-a-tabular-result-along-with-chart/m-p/315153#M58987</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-01-12T20:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a tabular result along with chart</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Creating-a-tabular-result-along-with-chart/m-p/315154#M58988</link>
      <description>&lt;P&gt;One possibility is to use &lt;CODE&gt;transaction&lt;/CODE&gt;, which you can configure with the start/end criteria as well as the field to join on.  Here is a run anywhere example of this in action:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults | eval _raw="Jan 5 16:48:25 MyAccount ERROR: com.ebpsource.XYZ123Consumer.Customer0: - E0 00300 Customer0 - ERROR: XYZGetAccountDefault returned 0 records for account=9999999 loginId=xyz@abc.om dateFrom=12/17/2017 dateTo=01/05/2018 doLinking=true isUDLAccount=false."
| append [| makeresults | eval _raw="05 Jan 2018 16:45:19,951 - INFO [http-bio-8080-exec-409] (Util.java:44) - 9999999: begin getAccountDefault()"]
| rex "(?&amp;lt;returned&amp;gt; records for account=(?&amp;lt;account&amp;gt;[^ ]+))"
| rex "(?&amp;lt;begin&amp;gt;- (?&amp;lt;account&amp;gt;[^:]+): begin)"
| transaction startswith=eval(isnotnull(begin)) endswith=eval(isnotnull(returned)) account
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This gives you one event per session, and will contain all of the fields from the contributing events.  It will also add another field named &lt;CODE&gt;duration&lt;/CODE&gt;, which is what it sounds like.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2018 20:59:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Creating-a-tabular-result-along-with-chart/m-p/315154#M58988</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2018-01-12T20:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a tabular result along with chart</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Creating-a-tabular-result-along-with-chart/m-p/315155#M58989</link>
      <description>&lt;P&gt;To illustrate what I am looking forward is lets consider one sample  request / response from the log :&lt;/P&gt;

&lt;H1&gt;REQUEST:&lt;/H1&gt;

&lt;H2&gt;05 Jan 2018 16:45:19,951 -  INFO &lt;A href="AbstractLoggingInterceptor.java:250"&gt;http-bio-8080-exec-409&lt;/A&gt; - Inbound Message&lt;/H2&gt;

&lt;P&gt;ID: 1682148&lt;BR /&gt;
Address: &lt;A href="http://internalservices.abc.com/ERPPeoplesoftService/service/PsciServiceImplPort/erpService?bridgeEndpoint=true&amp;amp;throwExceptionOnFailure=false"&gt;http://internalservices.abc.com/ERPPeoplesoftService/service/PsciServiceImplPort/erpService?bridgeEndpoint=true&amp;amp;amp;throwExceptionOnFailure=false&lt;/A&gt;&lt;BR /&gt;
Encoding: ISO-8859-1&lt;BR /&gt;
Http-Method: POST&lt;BR /&gt;
Content-Type: text/xml&lt;BR /&gt;
Headers: {Accept=[&lt;EM&gt;/&lt;/EM&gt;], breadcrumbid=[ID-XYZ-INT-ESB01-407etr-com-19853-1510587197074-50-2354125], cache-control=[no-cache], connection=[keep-alive], Content-Length=[503], content-type=[text/xml], host=[internalservices.407etr.com], pragma=[no-cache], user-agent=[Apache CXF 2.5.0]}&lt;BR /&gt;
Payload: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;psci:getPSAccountInfoDefault xmlns:ns2="http://erp.ABC.com" xmlns:psci="http://psci.etr407.com"&amp;gt;
     &amp;lt;defaultAcctNo&amp;gt;123456789&amp;lt;/defaultAcctNo&amp;gt;
     &amp;lt;doLinking&amp;gt;true&amp;lt;/doLinking&amp;gt;
     &amp;lt;isUdlAccount&amp;gt;false&amp;lt;/isUdlAccount&amp;gt;
     &amp;lt;source&amp;gt;WEB&amp;lt;/source&amp;gt;
     &amp;lt;dateFrom&amp;gt;12/17/2017&amp;lt;/dateFrom&amp;gt;
     &amp;lt;dateTo&amp;gt;01/05/2018&amp;lt;/dateTo&amp;gt;
  &amp;lt;/psci:getPSAccountInfoDefault&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;H1&gt;RESPONSE:&lt;/H1&gt;

&lt;P&gt;Jan  5 16:48:25 MyAccount ERROR: com.ebpsource.ABCConsumer.Customer0: - E0 00300 Customer0                 - ERROR: ETRGetPSAccountInfoDefault returned  0 records for account=123456789 loginId=&lt;A href="mailto:JOHN@ROGERS.COM"&gt;JOHN@ROGERS.COM&lt;/A&gt; &lt;/P&gt;

&lt;P&gt;Based on the common key word in the response and request that is getPSAccountInfoDefault I would like to fetch the result in the output format as below:&lt;/P&gt;

&lt;P&gt;Name of WS call,   Acct Number, Email ID, REQUEST DATE-TIME, RESPONSE DATE-TIME&lt;BR /&gt;
getPSAccountInfoDefault,123456789 , &lt;A href="mailto:JOHN@ROGERS.COM"&gt;JOHN@ROGERS.COM&lt;/A&gt;, 05 Jan 2018 16:45:19,Jan  5 16:48:25&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 19:11:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Creating-a-tabular-result-along-with-chart/m-p/315155#M58989</guid>
      <dc:creator>babidi</dc:creator>
      <dc:date>2018-01-22T19:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a tabular result along with chart</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Creating-a-tabular-result-along-with-chart/m-p/315156#M58990</link>
      <description>&lt;P&gt;I am not sure what should be in &amp;lt;&amp;gt; ?&lt;/P&gt;

&lt;P&gt;I don't have field extraction and not sure how can I do it considering the format of request and response.&lt;/P&gt;

&lt;P&gt;Can anyone assist for these?&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 21:26:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Creating-a-tabular-result-along-with-chart/m-p/315156#M58990</guid>
      <dc:creator>babidi</dc:creator>
      <dc:date>2018-01-22T21:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a tabular result along with chart</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Creating-a-tabular-result-along-with-chart/m-p/315157#M58991</link>
      <description>&lt;P&gt;By &amp;lt;&amp;gt; I dont know what it means "your base search to fetch both request and response event"&lt;/P&gt;

&lt;P&gt;If I understand correctly my base search would be to look for the keyword: GetPSAccountInfoDefault in both response and request in addition to accountnumber , in request it is mentioned as 123456789 and in response it comes as ERROR: ETRGetPSAccountInfoDefault returned 0 records for account=123456789&lt;/P&gt;

&lt;P&gt;how do I translate the above search search criteria and then extract fields as I never extracted fields before and get my desired output&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2018 21:30:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Creating-a-tabular-result-along-with-chart/m-p/315157#M58991</guid>
      <dc:creator>babidi</dc:creator>
      <dc:date>2018-01-22T21:30:40Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a tabular result along with chart</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Creating-a-tabular-result-along-with-chart/m-p/315158#M58992</link>
      <description>&lt;P&gt;Now fields are set up as: account,login,webservice,date,time , I am using regex to pull the webservice call name in this case PSAccountInfoDefault as search criteria..but I am not sure what should be in &amp;lt;&amp;gt; in eval Request_Time&lt;/P&gt;

&lt;P&gt;regex _raw="(?&amp;gt;"),strftime(_time,"%F %T"),null()&lt;BR /&gt;
 | eval Response_Time=if(isnull(Request_Time),strftime(_time,"%F %T"),null())&lt;BR /&gt;
 | stats values(*) as * range(_time) as Difference by Account_Number&lt;BR /&gt;
 | eval Difference=tostring(Difference,"duration")&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:49:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Creating-a-tabular-result-along-with-chart/m-p/315158#M58992</guid>
      <dc:creator>babidi</dc:creator>
      <dc:date>2020-09-29T17:49:43Z</dc:date>
    </item>
  </channel>
</rss>

