<?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 How to use the existence of a preceding event in timechart? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-existence-of-a-preceding-event-in-timechart/m-p/513642#M144137</link>
    <description>&lt;P&gt;I have an index where each event has unique EventID and Status fields.&lt;BR /&gt;&lt;BR /&gt;Each event is progressing through multiple interim statuses until it reaches one of the two terminal statuses: SUCCESS or FAILURE.&amp;nbsp; Each event goes through a subset of all possible interim statuses.&lt;BR /&gt;&lt;BR /&gt;I'm trying to build a &lt;EM&gt;timechart&lt;/EM&gt; that would show two counts:&amp;nbsp; All Failed Events and Failed Events&amp;nbsp; with a certain Interim Status.&lt;BR /&gt;&lt;BR /&gt;One of the problems is that a preceding interim event could be &lt;STRONG&gt;outside&lt;/STRONG&gt; of the span interval.&lt;BR /&gt;&lt;BR /&gt;I was thinking something along these lines (not necessarily syntactically correct):&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;index=... sourcetype=... Status IN ("FAILURE", "INTERIM") 
| timechart span=5m count by  EventId  
| untable _time eventCount
| stats count as "All" count(eval(EventCount==2)) as "With Interim" by _time &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Aug 2020 23:20:35 GMT</pubDate>
    <dc:creator>pm771</dc:creator>
    <dc:date>2020-08-11T23:20:35Z</dc:date>
    <item>
      <title>How to use the existence of a preceding event in timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-existence-of-a-preceding-event-in-timechart/m-p/513642#M144137</link>
      <description>&lt;P&gt;I have an index where each event has unique EventID and Status fields.&lt;BR /&gt;&lt;BR /&gt;Each event is progressing through multiple interim statuses until it reaches one of the two terminal statuses: SUCCESS or FAILURE.&amp;nbsp; Each event goes through a subset of all possible interim statuses.&lt;BR /&gt;&lt;BR /&gt;I'm trying to build a &lt;EM&gt;timechart&lt;/EM&gt; that would show two counts:&amp;nbsp; All Failed Events and Failed Events&amp;nbsp; with a certain Interim Status.&lt;BR /&gt;&lt;BR /&gt;One of the problems is that a preceding interim event could be &lt;STRONG&gt;outside&lt;/STRONG&gt; of the span interval.&lt;BR /&gt;&lt;BR /&gt;I was thinking something along these lines (not necessarily syntactically correct):&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;index=... sourcetype=... Status IN ("FAILURE", "INTERIM") 
| timechart span=5m count by  EventId  
| untable _time eventCount
| stats count as "All" count(eval(EventCount==2)) as "With Interim" by _time &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 23:20:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-existence-of-a-preceding-event-in-timechart/m-p/513642#M144137</guid>
      <dc:creator>pm771</dc:creator>
      <dc:date>2020-08-11T23:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the existence of a preceding event in timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-existence-of-a-preceding-event-in-timechart/m-p/513644#M144139</link>
      <description>&lt;LI-CODE lang="markup"&gt;index=... sourcetype=... Status IN ("FAILURE", "INTERIM") 
| stats min(eval(if(Status="INTERIM",_time,NULL))) as Interim min(eval(if(Status="FAILURE",_time,NULL))) as Failure by EventId
| eval Interim_EventID=if(isnotnull(Interim),EventID,NULL)
| eval time=mvappend(Interim,Failure)
| mvexpand time
| rename time as _time
| table _time EventId Interim_EventID
| sort _time&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;and&lt;BR /&gt;| timechart span=5m count(EventId) count(Interim_EventID)&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 23:40:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-existence-of-a-preceding-event-in-timechart/m-p/513644#M144139</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-08-11T23:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to use the existence of a preceding event in timechart?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-existence-of-a-preceding-event-in-timechart/m-p/513656#M144143</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/184221"&gt;@to4kawa&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;Thank you. It works.&lt;/P&gt;&lt;P&gt;Since I'm dealing with relatively large data sets I stumbled into &lt;STRONG&gt;10,000&lt;/STRONG&gt; limit on &lt;EM&gt;sort&lt;/EM&gt;.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, I used &lt;STRONG&gt;&lt;FONT face="andale mono,times" color="#339966"&gt;sort 0 _time&lt;/FONT&gt;&lt;/STRONG&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 02:49:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-the-existence-of-a-preceding-event-in-timechart/m-p/513656#M144143</guid>
      <dc:creator>pm771</dc:creator>
      <dc:date>2020-08-12T02:49:19Z</dc:date>
    </item>
  </channel>
</rss>

