<?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: get size/bytes of log events and the number events by direction (request/response) in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/get-size-bytes-of-log-events-and-the-number-events-by-direction/m-p/182012#M52471</link>
    <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ABC sourcetype=abc ServiceName=A* OR ServiceName=B* OR ServiceName=C* | eval raw_len=len(_raw) | eval count_{Direction} = 1 | timechart sum(count_REQUEST) as NumberOfRequests sum(count_RESPONSE) as NumberOfResponses sum(raw_len) as CombinedSize
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 06 May 2015 19:30:34 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2015-05-06T19:30:34Z</dc:date>
    <item>
      <title>get size/bytes of log events and the number events by direction (request/response)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/get-size-bytes-of-log-events-and-the-number-events-by-direction/m-p/182011#M52470</link>
      <description>&lt;P&gt;I am trying to get the number of requests/response that we send/receive to/from one application and the combined size of request &amp;amp; responses per hour.&lt;/P&gt;

&lt;P&gt;I am using the below query, but this doesn't seem to work.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ABC sourcetype=abc ServiceName=A* OR ServiceName=B* OR ServiceName=C* | eval raw_len=len(_raw) | eventstats sum(raw_len), count by date_hour, Direction
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I need results in the below table format...&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;date.hour&lt;/STRONG&gt;   &lt;STRONG&gt;NumberofRequests(direction=REQUEST)&lt;/STRONG&gt; &lt;STRONG&gt;Number of Responses (direction=RESPONSE)  Sum(bytes)&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Can someone please help me with this?&lt;BR /&gt;
Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2015 18:52:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/get-size-bytes-of-log-events-and-the-number-events-by-direction/m-p/182011#M52470</guid>
      <dc:creator>edookati</dc:creator>
      <dc:date>2015-05-06T18:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: get size/bytes of log events and the number events by direction (request/response)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/get-size-bytes-of-log-events-and-the-number-events-by-direction/m-p/182012#M52471</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ABC sourcetype=abc ServiceName=A* OR ServiceName=B* OR ServiceName=C* | eval raw_len=len(_raw) | eval count_{Direction} = 1 | timechart sum(count_REQUEST) as NumberOfRequests sum(count_RESPONSE) as NumberOfResponses sum(raw_len) as CombinedSize
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 May 2015 19:30:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/get-size-bytes-of-log-events-and-the-number-events-by-direction/m-p/182012#M52471</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2015-05-06T19:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: get size/bytes of log events and the number events by direction (request/response)</title>
      <link>https://community.splunk.com/t5/Splunk-Search/get-size-bytes-of-log-events-and-the-number-events-by-direction/m-p/182013#M52472</link>
      <description>&lt;P&gt;great! it worked. Thanks a lot.&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2015 20:14:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/get-size-bytes-of-log-events-and-the-number-events-by-direction/m-p/182013#M52472</guid>
      <dc:creator>edookati</dc:creator>
      <dc:date>2015-05-06T20:14:06Z</dc:date>
    </item>
  </channel>
</rss>

