<?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: stats after per_second function in Security</title>
    <link>https://community.splunk.com/t5/Security/stats-after-per-second-function/m-p/326601#M8386</link>
    <description>&lt;P&gt;Do it like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_*
| eval count=1, fieldA=host, fieldB=date_hour

| rename COMMENT AS "Everything above generates sample data (do for 'Last 200 seconds'); everything below is your solution"

| eval multi_key = source . "::" . sourcetype . "::" . fieldA . "::" . fieldB
| timechart span=1s per_second(count) BY multi_key
| untable _time multi_key TPS
| rex field=multi_key "^(?&amp;lt;source&amp;gt;.*?)::(?&amp;lt;sourcetype&amp;gt;.*?)::(?&amp;lt;fieldA&amp;gt;.*?)::(?&amp;lt;fieldB&amp;gt;.*)$"
| stats max(TPS) BY source sourcetype fieldA fieldB
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 04 Jun 2017 00:01:00 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2017-06-04T00:01:00Z</dc:date>
    <item>
      <title>stats after per_second function</title>
      <link>https://community.splunk.com/t5/Security/stats-after-per-second-function/m-p/326599#M8384</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a search query that looks like this,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;filter conditions&amp;gt; 
| eval count=1 
| timechart per_second(count) as TPS 
| eval TransactionPerSecond=max(TPS)  
| stats max(TransactionPerSecond) by source, sourcetype, fieldA, fieldB
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;What I am trying to do is split the 'Transactions per Second' value by source, sourcetype, fieldA and fieldB.&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;The stats part of it is not giving me any results.&lt;/P&gt;

&lt;P&gt;Are there any other ways to implement the above logic?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Deepak&lt;/P&gt;</description>
      <pubDate>Sat, 03 Jun 2017 23:06:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/stats-after-per-second-function/m-p/326599#M8384</guid>
      <dc:creator>deepak02</dc:creator>
      <dc:date>2017-06-03T23:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: stats after per_second function</title>
      <link>https://community.splunk.com/t5/Security/stats-after-per-second-function/m-p/326600#M8385</link>
      <description>&lt;P&gt;I think this would give you max transactions per second:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;base search&amp;gt; 
| bin span=1s _time
| stats count as TPS by source, sourcetype, fieldA, fieldB, _time
| stats max(TPS) by source, sourcetype, fieldA, fieldB
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 03 Jun 2017 23:47:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/stats-after-per-second-function/m-p/326600#M8385</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2017-06-03T23:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: stats after per_second function</title>
      <link>https://community.splunk.com/t5/Security/stats-after-per-second-function/m-p/326601#M8386</link>
      <description>&lt;P&gt;Do it like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_*
| eval count=1, fieldA=host, fieldB=date_hour

| rename COMMENT AS "Everything above generates sample data (do for 'Last 200 seconds'); everything below is your solution"

| eval multi_key = source . "::" . sourcetype . "::" . fieldA . "::" . fieldB
| timechart span=1s per_second(count) BY multi_key
| untable _time multi_key TPS
| rex field=multi_key "^(?&amp;lt;source&amp;gt;.*?)::(?&amp;lt;sourcetype&amp;gt;.*?)::(?&amp;lt;fieldA&amp;gt;.*?)::(?&amp;lt;fieldB&amp;gt;.*)$"
| stats max(TPS) BY source sourcetype fieldA fieldB
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 04 Jun 2017 00:01:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Security/stats-after-per-second-function/m-p/326601#M8386</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-06-04T00:01:00Z</dc:date>
    </item>
  </channel>
</rss>

