<?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: Report on first event in an incident which contains a cluster of abnormal transactions in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Report-on-first-event-in-an-incident-which-contains-a-cluster-of/m-p/113249#M29776</link>
    <description>&lt;P&gt;Thanks for viewing and at least thinking about this, Splunk answers community. I solved my problem by writing an python search command which I named clusterstats and I shared it with the world at &lt;A href="http://apps.splunk.com/app/1869/"&gt;http://apps.splunk.com/app/1869/&lt;/A&gt; &lt;/P&gt;

&lt;P&gt;Yay me!&lt;/P&gt;

&lt;P&gt;-sean&lt;/P&gt;</description>
    <pubDate>Fri, 19 Sep 2014 03:32:15 GMT</pubDate>
    <dc:creator>chanfoli</dc:creator>
    <dc:date>2014-09-19T03:32:15Z</dc:date>
    <item>
      <title>Report on first event in an incident which contains a cluster of abnormal transactions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Report-on-first-event-in-an-incident-which-contains-a-cluster-of/m-p/113246#M29773</link>
      <description>&lt;P&gt;Hello, I am grouping some events using &lt;STRONG&gt;transaction&lt;/STRONG&gt; and from there identifying what we will call a performance degradation in our application which manifests in longer than normal durations as calculated by &lt;STRONG&gt;transaction&lt;/STRONG&gt; . I would like to characterize the incidents by the number of "slow" transactions and the times of the first and last slow transaction, in the span defined by the cluster of slow transactions. I have looked at localize and some of the other commands but can't get anything to give me something useful. For now let's just say that abnormal transactions ar anything over 3 seconds and in an incident there could be 1 abnormal transaction or 100 and they generally last 5 to 20 seconds. &lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;BR /&gt;
Sean&lt;/P&gt;</description>
      <pubDate>Fri, 05 Sep 2014 16:06:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Report-on-first-event-in-an-incident-which-contains-a-cluster-of/m-p/113246#M29773</guid>
      <dc:creator>chanfoli</dc:creator>
      <dc:date>2014-09-05T16:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: Report on first event in an incident which contains a cluster of abnormal transactions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Report-on-first-event-in-an-incident-which-contains-a-cluster-of/m-p/113247#M29774</link>
      <description>&lt;P&gt;I tried a lot of stuff, but it seems to me that the problem is really "how do you define the cluster". You can use the &lt;CODE&gt;kmeans&lt;/CODE&gt; command, but to do that you have to specify the number of clusters in the command - which means that you have to already have looked at the output.&lt;/P&gt;

&lt;P&gt;But maybe the following will give you more ideas to try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearchhere
| stats range(_time) as duration earliest(_time) as startX latest(_time) as endX by transactionId
| where duration &amp;gt; 3
| sort startX
| streamstats window=1 current=f last(startX) as prevStartX
| eval beforeTimeDiff = startX - prevStartX
| reverse
| streamstats window=1 current=f last(startX) as afterStartX
| eval afterTimeDiff = afterStartX - startX
| eventstats p60(beforeTimeDiff) as beforeTimeCutoff p60(afterTimeDiff) as afterTimeCutoff
| where beforeTimeDiff &amp;gt; beforeTimeCutoff AND afterTimeDiff &amp;gt; afterTimeCutoff
| sort startX
| table startX duration 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Note that I didn't use the transaction command; I used &lt;CODE&gt;stats&lt;/CODE&gt; instead to calculate the duration. This works great if you have a unique identifier for the transaction; otherwise, you might have to use the &lt;CODE&gt;transaction&lt;/CODE&gt; command.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Sep 2014 20:47:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Report-on-first-event-in-an-incident-which-contains-a-cluster-of/m-p/113247#M29774</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-09-06T20:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: Report on first event in an incident which contains a cluster of abnormal transactions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Report-on-first-event-in-an-incident-which-contains-a-cluster-of/m-p/113248#M29775</link>
      <description>&lt;P&gt;Thank you for your effort Lisa. I will play with that at some point. Transaction was working smooth for me due to some of its options and when I plugged your suggestion in without it I was not getting anywhere. &lt;STRONG&gt;localize&lt;/STRONG&gt; seems that it would do what is needed but perhaps it does not play well with transaction. The behavior seems easy enough to write as a python command so I am going to explore that so that I can get the behavior I want. I am going to write the command to takes filtered results and an argument which represents the longest span of seconds that I want to consider a cluster.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Sep 2014 14:02:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Report-on-first-event-in-an-incident-which-contains-a-cluster-of/m-p/113248#M29775</guid>
      <dc:creator>chanfoli</dc:creator>
      <dc:date>2014-09-10T14:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: Report on first event in an incident which contains a cluster of abnormal transactions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Report-on-first-event-in-an-incident-which-contains-a-cluster-of/m-p/113249#M29776</link>
      <description>&lt;P&gt;Thanks for viewing and at least thinking about this, Splunk answers community. I solved my problem by writing an python search command which I named clusterstats and I shared it with the world at &lt;A href="http://apps.splunk.com/app/1869/"&gt;http://apps.splunk.com/app/1869/&lt;/A&gt; &lt;/P&gt;

&lt;P&gt;Yay me!&lt;/P&gt;

&lt;P&gt;-sean&lt;/P&gt;</description>
      <pubDate>Fri, 19 Sep 2014 03:32:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Report-on-first-event-in-an-incident-which-contains-a-cluster-of/m-p/113249#M29776</guid>
      <dc:creator>chanfoli</dc:creator>
      <dc:date>2014-09-19T03:32:15Z</dc:date>
    </item>
  </channel>
</rss>

