<?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: Use splunk to track response time in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/Use-splunk-to-track-response-time/m-p/80864#M12247</link>
    <description>&lt;P&gt;Also, with transaction you can use "keepevicted=true" to tell transaction to include transactions that didn't "close" with an endswith= line.  That causes transaction to include a binary field of closed_txn which you can search on to see what alerts were not acknowledged at all.&lt;/P&gt;</description>
    <pubDate>Wed, 13 Apr 2011 23:29:35 GMT</pubDate>
    <dc:creator>dwaddle</dc:creator>
    <dc:date>2011-04-13T23:29:35Z</dc:date>
    <item>
      <title>Use splunk to track response time</title>
      <link>https://community.splunk.com/t5/Alerting/Use-splunk-to-track-response-time/m-p/80862#M12245</link>
      <description>&lt;P&gt;hello there,&lt;/P&gt;

&lt;P&gt;I am trying to figure out the best way to possibly do the following task.&lt;/P&gt;

&lt;P&gt;We run nagios and some of our nagios alerts are communicated via a Jabber bot.  I would like to know how long it takes for an alert to be acknowledged from the time it fires and then from the time an analyst acknowledges it.  Examples of some of the lines in the logs are:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Thu Mar 31 19:57:57 2011: listenLoop: raw line: PROBLEM*|*rg-da-dysonrep3*|*Check disk RG - data_dysonrep3*|*CRITICAL*|*1*|*DISK CRITICAL - free space: /foo/foobar/data_dysonrep3 4 MB...
Thu Mar 31 20:02:57 2011: listenLoop: raw line: PROBLEM*|*rg-da-dysonrep3*|*Check disk RG - data_dysonrep3*|*CRITICAL*|*2*|*DISK CRITICAL - free space: /foo/foobar/data_dysonrep3 4 MB...
Thu Mar 31 20:08:53 2011: listenLoop: raw line: ACKNOWLEDGEMENT*|*rg-da-dysonrep3*|*Check disk RG - data_dysonrep3*|*CRITICAL*|*2*|*ajohnson: 174782
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;These lines could be mixed in with other lines as well in the log.  They aren't always in perfect order like this.  What I would need to do is use splunk to find out how long it took for an analyst to acknowledge the alert after it first fired.  In this case it looks like it took 11 minutes.  The alert fired twice and then was acknowledged.  &lt;/P&gt;

&lt;P&gt;I've been researching different commands and I'm not sure if "diff" would be the one I'm looking for.  I'm still trying to figure out how I could get splunk to match up every alert that fires with an acknowledgement, if there is one at all.&lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2011 23:05:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Use-splunk-to-track-response-time/m-p/80862#M12245</guid>
      <dc:creator>gnovak</dc:creator>
      <dc:date>2011-04-13T23:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: Use splunk to track response time</title>
      <link>https://community.splunk.com/t5/Alerting/Use-splunk-to-track-response-time/m-p/80863#M12246</link>
      <description>&lt;P&gt;gnovak,&lt;/P&gt;

&lt;P&gt;I would recommend using the "transaction" command for this.  You would need to extract a field (i.e. alert_id) which uniquely identifies your alerts (i.e. rg-da-dysonrep3).  Then you would perform you search like so:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;my alert events&amp;gt; | transaction alert_id startswith=PROBLEM endswith=ACKNOWLEDGEMENT | stats max(duration) by alert_id
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Ultimately "transaction" will give you a "duration" field that you can do a number of things with...like calculate average duration by analyst.&lt;/P&gt;

&lt;P&gt;See also:
&lt;A href="http://www.splunk.com/base/Documentation/latest/SearchReference/Transaction" rel="nofollow"&gt;http://www.splunk.com/base/Documentation/latest/SearchReference/Transaction&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2011 23:25:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Use-splunk-to-track-response-time/m-p/80863#M12246</guid>
      <dc:creator>hazekamp</dc:creator>
      <dc:date>2011-04-13T23:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: Use splunk to track response time</title>
      <link>https://community.splunk.com/t5/Alerting/Use-splunk-to-track-response-time/m-p/80864#M12247</link>
      <description>&lt;P&gt;Also, with transaction you can use "keepevicted=true" to tell transaction to include transactions that didn't "close" with an endswith= line.  That causes transaction to include a binary field of closed_txn which you can search on to see what alerts were not acknowledged at all.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2011 23:29:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Use-splunk-to-track-response-time/m-p/80864#M12247</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2011-04-13T23:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: Use splunk to track response time</title>
      <link>https://community.splunk.com/t5/Alerting/Use-splunk-to-track-response-time/m-p/80865#M12248</link>
      <description>&lt;P&gt;After trying this so far this seems to be promising: sourcetype="jabber_nagios" NOT RECOVERY listenLoop | transaction startswith=PROBLEM endswith=ACKNOWLEDGEMENT&lt;BR /&gt;
However I tried extracting the alert and hostname and putting this into the search causes the results to just look strange.  I'll keep trying&lt;/P&gt;</description>
      <pubDate>Thu, 14 Apr 2011 05:14:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Use-splunk-to-track-response-time/m-p/80865#M12248</guid>
      <dc:creator>gnovak</dc:creator>
      <dc:date>2011-04-14T05:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: Use splunk to track response time</title>
      <link>https://community.splunk.com/t5/Alerting/Use-splunk-to-track-response-time/m-p/80866#M12249</link>
      <description>&lt;P&gt;I disagree; transaction has very expensive resource costs and I would avoid it whenever possible.  Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;my_alert_events | stats earliest(_time) AS startTime, latest(_time) AS endTime by alert_id | eval responseTime=endTime-startTime
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 May 2015 19:59:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/Use-splunk-to-track-response-time/m-p/80866#M12249</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-05-05T19:59:18Z</dc:date>
    </item>
  </channel>
</rss>

