<?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: How to create a chart that will display the open and resolved tickets over time? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-chart-that-will-display-the-open-and-resolved/m-p/434796#M124033</link>
    <description>&lt;P&gt;Yes, that is what happens after the mvexpand command. It will create two entries per ticket, one for 'Open' and one for 'Resolved'. This is so that I could timechart it by open and resolved. &lt;/P&gt;</description>
    <pubDate>Fri, 08 Mar 2019 11:52:08 GMT</pubDate>
    <dc:creator>dojiepreji</dc:creator>
    <dc:date>2019-03-08T11:52:08Z</dc:date>
    <item>
      <title>How to create a chart that will display the open and resolved tickets over time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-chart-that-will-display-the-open-and-resolved/m-p/434792#M124029</link>
      <description>&lt;P&gt;I need to create a chart that will display the open and resolved tickets over time. &lt;/P&gt;

&lt;P&gt;Here is my current code:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval myTime = _time 
| eval restoredDate = restored_on_epoch
| eval eventTime = split(myTime."|".restoredDate, "|") 
| mvexpand eventTime 
| eval status = if(eventTime = _time, "Open", "Resolved") 
| eval _time = eventTime 
| timechart span=1mon count by status
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;My field '_time' is the creation date of ticket and 'restored_on_epoch' the resolved date. If a ticket hasn't been resolved yet, the 'restored_on_epoch' field will have a null value. &lt;/P&gt;

&lt;P&gt;The search above works just fine. However, it only creates a timechart for tickets that has been solved. The tickets with null values in the restored_on_epoch (those tickets that are not solved yet) are not included in the timechart. I want to include these as well in my "Open" field in my timechart. &lt;/P&gt;

&lt;P&gt;How should I achieve this? Any help would be appreciated. Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:39:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-chart-that-will-display-the-open-and-resolved/m-p/434792#M124029</guid>
      <dc:creator>dojiepreji</dc:creator>
      <dc:date>2020-09-29T23:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a chart that will display the open and resolved tickets over time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-chart-that-will-display-the-open-and-resolved/m-p/434793#M124030</link>
      <description>&lt;P&gt;I think the problem lies in this snippet: &lt;CODE&gt;if(eventTime = _time&lt;/CODE&gt; I cant quite understand what that is trying to eval.&lt;/P&gt;

&lt;P&gt;Would the following give the desired results?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | eval myTime = _time 
 | eval restoredDate = restored_on_epoch
 | eval status = if((restoredDate&amp;gt;myTime), "Resolved", "Open") 
 | eval _time =coalesce(restoredDate,_time)
 | timechart span=1mon count by status
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The logic here, is that a resolved issue has a resolved date later than the creation date, so do the eval based on that.&lt;BR /&gt;
Then if there is a restoredDate, use that for the _time filed, otherwise use the ticket open time.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 09:54:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-chart-that-will-display-the-open-and-resolved/m-p/434793#M124030</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2019-03-08T09:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a chart that will display the open and resolved tickets over time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-chart-that-will-display-the-open-and-resolved/m-p/434794#M124031</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;if(eventTime = _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is to assign each ticket a status of Open and Resolved. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;name         date created                           date resolved            status
ticket_132 2019-03-07 23:12:12  03/07/2019 11:40:23 PM  Open
ticket_132 2019-03-07 20:40:42  03/07/2019 12:00:12 PM  Resolved
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Each ticket will have corresponding 'open' and 'resolved' statuses. &lt;/P&gt;

&lt;P&gt;What I want to happen is something like this: &lt;BR /&gt;
For example, a ticket was created on december and resolved on february. I want it to add the ticket on 'open' on months december, january and then to 'resolved' on february on my timechart. &lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 11:13:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-chart-that-will-display-the-open-and-resolved/m-p/434794#M124031</guid>
      <dc:creator>dojiepreji</dc:creator>
      <dc:date>2019-03-08T11:13:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a chart that will display the open and resolved tickets over time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-chart-that-will-display-the-open-and-resolved/m-p/434795#M124032</link>
      <description>&lt;P&gt;Surely it only has a resolved date, if the issue is resolved??&lt;BR /&gt;
In your table you have two different resolved dates for the same ticket.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 11:24:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-chart-that-will-display-the-open-and-resolved/m-p/434795#M124032</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2019-03-08T11:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a chart that will display the open and resolved tickets over time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-chart-that-will-display-the-open-and-resolved/m-p/434796#M124033</link>
      <description>&lt;P&gt;Yes, that is what happens after the mvexpand command. It will create two entries per ticket, one for 'Open' and one for 'Resolved'. This is so that I could timechart it by open and resolved. &lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 11:52:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-chart-that-will-display-the-open-and-resolved/m-p/434796#M124033</guid>
      <dc:creator>dojiepreji</dc:creator>
      <dc:date>2019-03-08T11:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a chart that will display the open and resolved tickets over time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-chart-that-will-display-the-open-and-resolved/m-p/434797#M124034</link>
      <description>&lt;P&gt;Maybe its a typo in the ticket number, but your table has two rows for ticket 132.&lt;BR /&gt;
Each row has a different created and resolved date, and even though the top row is 'Open' it still has a resolved date.&lt;/P&gt;

&lt;P&gt;Is that the results your query (from the question) produces?&lt;/P&gt;</description>
      <pubDate>Fri, 08 Mar 2019 11:59:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-chart-that-will-display-the-open-and-resolved/m-p/434797#M124034</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2019-03-08T11:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a chart that will display the open and resolved tickets over time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-chart-that-will-display-the-open-and-resolved/m-p/434798#M124035</link>
      <description>&lt;P&gt;It's what the result looks like after the mvexpand command. There is originally only one table entry per ticket, but after the mvexpand command, it produces another copy of the ticket so that I can tally the tickets' as Open and Resolved. &lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 03:24:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-chart-that-will-display-the-open-and-resolved/m-p/434798#M124035</guid>
      <dc:creator>dojiepreji</dc:creator>
      <dc:date>2019-03-11T03:24:40Z</dc:date>
    </item>
  </channel>
</rss>

