<?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: ES Use case - How to detect an ongoing activity using Transaction ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/ES-Use-case-How-to-detect-an-ongoing-activity-using-Transaction/m-p/601652#M209392</link>
    <description>&lt;P&gt;Can you not use the eventcount returned with each transaction event to determine if an attack is ongoing?&lt;/P&gt;</description>
    <pubDate>Tue, 14 Jun 2022 06:33:23 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2022-06-14T06:33:23Z</dc:date>
    <item>
      <title>ES Use case - How to detect an ongoing activity using Transaction ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/ES-Use-case-How-to-detect-an-ongoing-activity-using-Transaction/m-p/601649#M209389</link>
      <description>&lt;P&gt;Hello,&amp;nbsp; &amp;nbsp;Is there a way to use transaction command to let us know if an activity/attack is ongoing ?&lt;BR /&gt;Scenario :&amp;nbsp; Create a search that detects ongoing DDOS activity&lt;/P&gt;&lt;P&gt;I have the following search that will detect DOS activity events and track them using transaction.&amp;nbsp; I see there is a &lt;STRONG&gt;maxspan&lt;/STRONG&gt; option available but there is no &lt;STRONG&gt;minspan&lt;/STRONG&gt; .&amp;nbsp; &amp;nbsp;Even if i schedule this to run &lt;STRONG&gt;every 1h,&lt;/STRONG&gt; the &lt;STRONG&gt;maxspan&lt;/STRONG&gt; will show those results that are less than 1h too.&amp;nbsp; Since there is no &lt;STRONG&gt;minspan&lt;/STRONG&gt; option, how to make it detect an ongoing activity ?&amp;nbsp; Hope i am clear&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;My search:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=arbor ...
| transaction eventID startswith=starting endswith=end maxspan=1h
| eval starttime = _time 
| eval duration = "Ongoing"
| convert ctime(starttime)
| table starttime, duration, condition&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Maybe my above approach is wrong. How else can we accomplish this?&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 06:26:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/ES-Use-case-How-to-detect-an-ongoing-activity-using-Transaction/m-p/601649#M209389</guid>
      <dc:creator>neerajs_81</dc:creator>
      <dc:date>2022-06-14T06:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: ES Use case - How to detect an ongoing activity using Transaction ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/ES-Use-case-How-to-detect-an-ongoing-activity-using-Transaction/m-p/601652#M209392</link>
      <description>&lt;P&gt;Can you not use the eventcount returned with each transaction event to determine if an attack is ongoing?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 06:33:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/ES-Use-case-How-to-detect-an-ongoing-activity-using-Transaction/m-p/601652#M209392</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-06-14T06:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: ES Use case - How to detect an ongoing activity using Transaction ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/ES-Use-case-How-to-detect-an-ongoing-activity-using-Transaction/m-p/601666#M209395</link>
      <description>&lt;P&gt;Ok. Let me check.&amp;nbsp; Should i check for something like&amp;nbsp; isnull(EventCount) or isNOTnull(EventCount)&amp;nbsp; to determine transaction is on going ?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 07:08:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/ES-Use-case-How-to-detect-an-ongoing-activity-using-Transaction/m-p/601666#M209395</guid>
      <dc:creator>neerajs_81</dc:creator>
      <dc:date>2022-06-14T07:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: ES Use case - How to detect an ongoing activity using Transaction ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/ES-Use-case-How-to-detect-an-ongoing-activity-using-Transaction/m-p/601669#M209397</link>
      <description>&lt;P&gt;The transaction command processes the events in the pipeline. What I am suggesting is that the number of events in the transaction might tell you whether there is an attack (within the transaction). To see if it is "ongoing" you could look for the latest timestamp in the transaction and compare it to the current time?&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 07:40:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/ES-Use-case-How-to-detect-an-ongoing-activity-using-Transaction/m-p/601669#M209397</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-06-14T07:40:36Z</dc:date>
    </item>
    <item>
      <title>Re: ES Use case - How to detect an ongoing activity using Transaction ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/ES-Use-case-How-to-detect-an-ongoing-activity-using-Transaction/m-p/601841#M209458</link>
      <description>&lt;P&gt;i am trying to do what you suggested, look at the latest timestamp ( as in the last timestamp) in the "transaction" and compare with current time but its not working out. Can you pls advise where i am going wrong in the below search ?&lt;BR /&gt;&lt;BR /&gt;The transaction results have multiple events within each one, and there is a field called &lt;STRONG&gt;datetime&lt;/STRONG&gt; which is multi value field and it has values of timestamps of all different events in that transaction.&amp;nbsp; I am using mvindex to capture the "last" value from this datetime array.&amp;nbsp; That will give me the last as in latest timestamp of that activity.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I checked under "Interesting fields" in Splunk ,&amp;nbsp; the DT field values are correctly showing up.&amp;nbsp; But the "&lt;STRONG&gt;LastSeenEventTime&lt;/STRONG&gt;" is not getting created.&amp;nbsp; Any suggestions why ?&amp;nbsp; I am converting &lt;STRONG&gt;DT&lt;/STRONG&gt; into epoch time and saving that a &lt;STRONG&gt;LastSeenEventTime&lt;/STRONG&gt; . Then i am comparing with &lt;STRONG&gt;now&lt;/STRONG&gt;() field to achieve the use case.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval DT =mvindex(datetime,-1)
| eval LastSeenEventTime = strptime(DT, "%m-%d-%Y %H:%M:%S")
| table eventcount logtype, eventID, status, eventType, severity
| where DT = now()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="neerajs_81_0-1655278259840.png" style="width: 436px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/20104iA83AA6EF816C8B51/image-dimensions/436x159?v=v2" width="436" height="159" role="button" title="neerajs_81_0-1655278259840.png" alt="neerajs_81_0-1655278259840.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 07:31:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/ES-Use-case-How-to-detect-an-ongoing-activity-using-Transaction/m-p/601841#M209458</guid>
      <dc:creator>neerajs_81</dc:creator>
      <dc:date>2022-06-15T07:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: ES Use case - How to detect an ongoing activity using Transaction ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/ES-Use-case-How-to-detect-an-ongoing-activity-using-Transaction/m-p/601848#M209462</link>
      <description>&lt;P&gt;LastSeenEventTime and DT do not appear in your table command so are not available beyond this point. Could this be your issue?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 08:03:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/ES-Use-case-How-to-detect-an-ongoing-activity-using-Transaction/m-p/601848#M209462</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-06-15T08:03:47Z</dc:date>
    </item>
    <item>
      <title>Re: ES Use case - How to detect an ongoing activity using Transaction ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/ES-Use-case-How-to-detect-an-ongoing-activity-using-Transaction/m-p/601867#M209471</link>
      <description>&lt;P&gt;No, not really. Even if i include them in table command,&amp;nbsp; the table view returns &amp;lt;empty&amp;gt;&lt;BR /&gt;Couple of questions:&lt;BR /&gt;1. Is this the right way to compare/check against the current time&amp;nbsp; -&amp;nbsp; &amp;nbsp;&lt;STRONG&gt;| where DT = now()&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;2. As per my screenshot you will see the datetime field has values in this format: &amp;nbsp;&lt;STRONG&gt;2022-06-15 16:15:21+08:00&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;So if i am doing a | eval LastSeenEventTime = strptime(DT, &lt;STRONG&gt;"%Y-%m-%d %H:%M:%S") , &lt;/STRONG&gt;is this correct?&amp;nbsp; The +08:00 is not accounted for in the time format.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 09:16:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/ES-Use-case-How-to-detect-an-ongoing-activity-using-Transaction/m-p/601867#M209471</guid>
      <dc:creator>neerajs_81</dc:creator>
      <dc:date>2022-06-15T09:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: ES Use case - How to detect an ongoing activity using Transaction ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/ES-Use-case-How-to-detect-an-ongoing-activity-using-Transaction/m-p/601888#M209481</link>
      <description>&lt;P&gt;1. Comparing to now() is unlikely to get a hit. The timestamps you are comparing are from the events, which will have been logged, then ingested and indexed, all of which takes time, so they are unlikely to be instant i.e. they won't match now(). You would probably be better considering the difference between now() and DT and see if it is close (by whatever you consider to be close, taking into account the lag time between the event being logged and it being available in the index).&lt;/P&gt;&lt;P&gt;2. For the time format to take timezone into account, you need to add it to parsing string&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval LastSeenEventTime = strptime(DT, "%Y-%m-%d %H:%M:%S %:z")&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 15 Jun 2022 10:05:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/ES-Use-case-How-to-detect-an-ongoing-activity-using-Transaction/m-p/601888#M209481</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-06-15T10:05:33Z</dc:date>
    </item>
  </channel>
</rss>

