<?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 Create a backlog summary with the lastest status in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Create-a-backlog-summary-with-the-lastest-status/m-p/579118#M201815</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I'm trying to do a search that look at the latest status of a given actionid everyday to make a kind of day by day backlog (event if no action was done). To be clearer, let's say we have the events :&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;12/01/2021 actionid=actionid1 status=start&lt;BR /&gt;12/02/2021 actionid=actionid2 status=start&lt;BR /&gt;12/06/2021 actionid=actionid1 status=sent&lt;BR /&gt;12/08/2021 actionid=actionid2 status=sent&lt;BR /&gt;12/09/2021 actionid=actionid1 status=done&lt;BR /&gt;12/10/2021 actionid=actionid2 status=done&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;The status of a given action doesn't evolve (until it change) but I've no event before it change. And the result that I want is something like (representing the backlog of the actionid by status day by day) :&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;start&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;sent&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;done&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;12/01/2021&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;12/02/2021&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;2&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;12/03/2021&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;2&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;12/04/2021&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;2&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;12/05/2021&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;2&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;12/06/2021&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;12/07/2021&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;12/08/2021&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;2&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;12/09/2021&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;12/10/2021&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope my request is clear enough. Any help would by great &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Francois&lt;/P&gt;</description>
    <pubDate>Wed, 22 Dec 2021 16:38:37 GMT</pubDate>
    <dc:creator>francoisternois</dc:creator>
    <dc:date>2021-12-22T16:38:37Z</dc:date>
    <item>
      <title>Create a backlog summary with the lastest status</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-a-backlog-summary-with-the-lastest-status/m-p/579118#M201815</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;I'm trying to do a search that look at the latest status of a given actionid everyday to make a kind of day by day backlog (event if no action was done). To be clearer, let's say we have the events :&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;12/01/2021 actionid=actionid1 status=start&lt;BR /&gt;12/02/2021 actionid=actionid2 status=start&lt;BR /&gt;12/06/2021 actionid=actionid1 status=sent&lt;BR /&gt;12/08/2021 actionid=actionid2 status=sent&lt;BR /&gt;12/09/2021 actionid=actionid1 status=done&lt;BR /&gt;12/10/2021 actionid=actionid2 status=done&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;The status of a given action doesn't evolve (until it change) but I've no event before it change. And the result that I want is something like (representing the backlog of the actionid by status day by day) :&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;start&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;sent&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;done&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;12/01/2021&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;12/02/2021&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;2&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;12/03/2021&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;2&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;12/04/2021&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;2&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;12/05/2021&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;2&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;12/06/2021&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;12/07/2021&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;12/08/2021&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;2&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;12/09/2021&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;1&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%" height="25px"&gt;12/10/2021&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;0&lt;/TD&gt;&lt;TD width="25%" height="25px"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope my request is clear enough. Any help would by great &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Francois&lt;/P&gt;</description>
      <pubDate>Wed, 22 Dec 2021 16:38:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-a-backlog-summary-with-the-lastest-status/m-p/579118#M201815</guid>
      <dc:creator>francoisternois</dc:creator>
      <dc:date>2021-12-22T16:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Create a backlog summary with the lastest status</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-a-backlog-summary-with-the-lastest-status/m-p/579143#M201829</link>
      <description>&lt;P&gt;There are probably better ways, here's my stab at it:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw="event_time=12/01/2021 actionid=actionid1 status=start,
event_time=12/02/2021 actionid=actionid2 status=start,
event_time=12/06/2021 actionid=actionid1 status=sent,
event_time=12/06/2021 actionid=actionid2 status=sent,
event_time=12/09/2021 actionid=actionid1 status=done,
event_time=12/10/2021 actionid=actionid2 status=done"
| eval events=SPLIT(_raw, ",") | mvexpand events
| rex field=events "event_time=(?&amp;lt;event_time&amp;gt;[^\s]*)\sactionid=(?&amp;lt;actionid&amp;gt;[^\s]*)\sstatus=(?&amp;lt;status&amp;gt;[^\s]*)"
| eval _time=strptime(event_time, "%m/%d/%Y")

| bucket _time span=1d | eval epoch_time=_time
| append [| makeresults | eval date_range=mvrange(relative_time(now(), "-365d"), relative_time(now(), "-0d"), 86400) | mvexpand date_range | eval _time=date_range | bucket _time span=1d | table _time]
| eventstats min(epoch_time) AS start_time max(epoch_time) AS end_time
| where _time&amp;gt;=start_time AND _time&amp;lt;=end_time
| eval {status}=1 
| eval start=IF(sent=1, sent * -1, start)  
| eval sent=IF(done=1, done * -1, sent)  
| sort 0 _time 
| fillnull value=0 start sent done
| streamstats min(_time) AS min_time max(_time) AS max(_time) sum(start) AS start sum(sent) AS sent sum(done) AS done
| dedup _time | table _time start sent done&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Dec 2021 20:57:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-a-backlog-summary-with-the-lastest-status/m-p/579143#M201829</guid>
      <dc:creator>johnhuang</dc:creator>
      <dc:date>2021-12-22T20:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: Create a backlog summary with the lastest status</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Create-a-backlog-summary-with-the-lastest-status/m-p/579146#M201832</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Your base search
|  timechart span=1d count by status usenull=f 
|  eval start=if(sent&amp;gt;0, start-sent, start) 
|  accum start 
|  eval sent=if(done&amp;gt;0, sent-done, sent) 
|  accum sent 
|  accum done&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 22 Dec 2021 21:45:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Create-a-backlog-summary-with-the-lastest-status/m-p/579146#M201832</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2021-12-22T21:45:38Z</dc:date>
    </item>
  </channel>
</rss>

