<?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: Stats Calculate Time Taken to Copy the Indexes in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/551366#M38119</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks but the output is like the following...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;day host starttime completetime&lt;BR /&gt;2021-05-05 hostname 1620228103.281&lt;BR /&gt;2021-05-05 hostname 1620228045.815&lt;BR /&gt;2021-05-05 hostname 1620228474.435&lt;BR /&gt;2021-05-05 hostname 1620228646.272&lt;BR /&gt;2021-05-05 hostname 1620228205.655&lt;BR /&gt;2021-05-05 hostname1620227386.055&lt;BR /&gt;2021-05-09 hostname1620611884.843&lt;BR /&gt;2021-05-10 hostname1620637757.090&lt;/P&gt;</description>
    <pubDate>Wed, 12 May 2021 15:07:02 GMT</pubDate>
    <dc:creator>praneethlekkala</dc:creator>
    <dc:date>2021-05-12T15:07:02Z</dc:date>
    <item>
      <title>Stats Calculate Time Taken to Copy the Indexes</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/550316#M37993</link>
      <description>&lt;P&gt;Our Application does a nightly re-index on node 1, once thats complete, the index build is copied to 6 other nodes,&amp;nbsp; Each of the other nodes then restore the files. These entries are noted as "Index restore started." and "Index restore complete." in the application logs. I would like to have a dashboard panel that shows how long it takes from "started" to "complete" on each host to be able to see trends for this over time. How to go about this?&lt;/P&gt;</description>
      <pubDate>Tue, 04 May 2021 03:31:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/550316#M37993</guid>
      <dc:creator>praneethlekkala</dc:creator>
      <dc:date>2021-05-04T03:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Calculate Time Taken to Copy the Indexes</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/550345#M38000</link>
      <description>&lt;P&gt;Can you share anonymised sample log entries so we can see what you are dealing with?&lt;/P&gt;</description>
      <pubDate>Tue, 04 May 2021 08:01:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/550345#M38000</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-05-04T08:01:59Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Calculate Time Taken to Copy the Indexes</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/550349#M38001</link>
      <description />
      <pubDate>Tue, 04 May 2021 08:16:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/550349#M38001</guid>
      <dc:creator>praneethlekkala</dc:creator>
      <dc:date>2021-05-04T08:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Calculate Time Taken to Copy the Indexes</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/550352#M38003</link>
      <description>&lt;P class="lia-align-justify"&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-align-justify"&gt;Thanks for the reply.&lt;/P&gt;&lt;P class="lia-align-justify"&gt;Here is the Index Start Event:&lt;/P&gt;&lt;P class="lia-align-justify"&gt;5/4/21&lt;BR /&gt;2:43:26.502 AM&lt;BR /&gt;2021-05-04 02:43:26,502-0400 NodeReindexServiceThread:thread-0 INFO [c.a.j.index.ha.DefaultIndexCopyService] Index restore started. Total 3561438 issues on instance before loading Snapshot file: IndexSnapshot_39801.tar.sz&lt;BR /&gt;host = hostname&lt;/P&gt;&lt;P class="lia-align-justify"&gt;source = application.log&lt;/P&gt;&lt;P class="lia-align-justify"&gt;The Following is the Index Completed Event , inned the duration from the time it started to when its complete by the hostname please.&lt;/P&gt;&lt;P class="lia-align-justify"&gt;5/3/21&lt;BR /&gt;1:08:10.843 AM&lt;BR /&gt;2021-05-03 01:08:10,843-0400 NodeReindexServiceThread:thread-0 INFO [c.a.j.index.ha.DefaultIndexCopyService] Index restore complete. Total 3653227 issues on instance&lt;BR /&gt;host = hostname&lt;/P&gt;&lt;P class="lia-align-justify"&gt;source = application.log&lt;/P&gt;</description>
      <pubDate>Tue, 04 May 2021 08:27:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/550352#M38003</guid>
      <dc:creator>praneethlekkala</dc:creator>
      <dc:date>2021-05-04T08:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Calculate Time Taken to Copy the Indexes</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/550358#M38004</link>
      <description>&lt;LI-CODE lang="markup"&gt;--- search
| eval starttime=if(match(_raw,"Index restore started"),_time,null)
| eval completetime=if(match(_raw,"Index restore complete"),_time,null)
| stats latest(starttime) as starttime latest(completetime) as completetime by host&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 04 May 2021 09:05:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/550358#M38004</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-05-04T09:05:48Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Calculate Time Taken to Copy the Indexes</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/550382#M38008</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks i tried the query and got the following, how to make it readable?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;host&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;starttime&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;completetime&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="215.547px" height="24px"&gt;Hostname&lt;/TD&gt;&lt;TD width="285.283px" height="24px"&gt;1620017696.169&lt;/TD&gt;&lt;TD width="140.377px" height="24px"&gt;1620018391.676&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Tue, 04 May 2021 11:57:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/550382#M38008</guid>
      <dc:creator>praneethlekkala</dc:creator>
      <dc:date>2021-05-04T11:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Calculate Time Taken to Copy the Indexes</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/550385#M38009</link>
      <description>&lt;LI-CODE lang="markup"&gt;| fieldformat starttime=strftime(starttime,"%Y-%m-%d %H:%M:%S")
| fieldformat completetime=strftime(completetime,"%Y-%m-%d %H:%M:%S")&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 04 May 2021 12:09:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/550385#M38009</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-05-04T12:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Calculate Time Taken to Copy the Indexes</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/550397#M38010</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks, can we calculate the number of minutes as a column? Rather than giving the result in hours?&lt;/P&gt;</description>
      <pubDate>Tue, 04 May 2021 13:00:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/550397#M38010</guid>
      <dc:creator>praneethlekkala</dc:creator>
      <dc:date>2021-05-04T13:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Calculate Time Taken to Copy the Indexes</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/550492#M38027</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;thanks, can we calculate the number of minutes as a column?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2021 06:20:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/550492#M38027</guid>
      <dc:creator>praneethlekkala</dc:creator>
      <dc:date>2021-05-05T06:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Calculate Time Taken to Copy the Indexes</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/550494#M38028</link>
      <description>&lt;LI-CODE lang="markup"&gt;| eval duration=tostring(completetime-starttime,"duration")
| eval completeminutes=floor((completetime-starttime)/60)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 05 May 2021 06:52:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/550494#M38028</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-05-05T06:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Calculate Time Taken to Copy the Indexes</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/551361#M38116</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Based on the range and the search, it looks like this takes the last 7 days and finds the latest start and complete times and uses those. What we really want to see is how long it takes each day so that we can compare day over day. As we are seeing that reindexing is taking a long time lately, we would probably then choose a range of 30 days or even longer to get a comparison.&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 14:13:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/551361#M38116</guid>
      <dc:creator>praneethlekkala</dc:creator>
      <dc:date>2021-05-12T14:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Calculate Time Taken to Copy the Indexes</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/551364#M38117</link>
      <description>&lt;LI-CODE lang="markup"&gt;--- search
| bin span=1d _time as day
| eval starttime=if(match(_raw,"Index restore started"),_time,null)
| eval completetime=if(match(_raw,"Index restore complete"),_time,null)
| stats latest(starttime) as starttime latest(completetime) as completetime by day host
| fieldformat day=strftime(day,"%Y-%m-%d")
| eval duration=tostring(completetime-starttime,"duration")
| eval completeminutes=floor((completetime-starttime)/60)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 12 May 2021 14:53:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/551364#M38117</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-05-12T14:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Calculate Time Taken to Copy the Indexes</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/551366#M38119</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks but the output is like the following...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;day host starttime completetime&lt;BR /&gt;2021-05-05 hostname 1620228103.281&lt;BR /&gt;2021-05-05 hostname 1620228045.815&lt;BR /&gt;2021-05-05 hostname 1620228474.435&lt;BR /&gt;2021-05-05 hostname 1620228646.272&lt;BR /&gt;2021-05-05 hostname 1620228205.655&lt;BR /&gt;2021-05-05 hostname1620227386.055&lt;BR /&gt;2021-05-09 hostname1620611884.843&lt;BR /&gt;2021-05-10 hostname1620637757.090&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 15:07:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/551366#M38119</guid>
      <dc:creator>praneethlekkala</dc:creator>
      <dc:date>2021-05-12T15:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Calculate Time Taken to Copy the Indexes</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/551368#M38120</link>
      <description>&lt;P&gt;Given that you only have one time (apart from the day), either starttime or completetime is not being evaluated correctly. It is not possible to tell from the example you pasted. If you can't tell, try changing the order of the fields e.g. day starttime host completetime to see which is missing and then work out why.&lt;/P&gt;</description>
      <pubDate>Wed, 12 May 2021 15:18:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/551368#M38120</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-05-12T15:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Calculate Time Taken to Copy the Indexes</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/554810#M38559</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The search query that i use is the following:&lt;/P&gt;&lt;P&gt;host=hostname* "Index restore*" | eval starttime=if(match(_raw,"Index restore started"),_time,null)&lt;BR /&gt;| eval completetime=if(match(_raw,"Index restore complete"),_time,null)&lt;BR /&gt;| stats latest(starttime) as starttime latest(completetime) as completetime by host | fieldformat starttime=strftime(starttime,"%Y-%m-%d %H:%M:%S")&lt;BR /&gt;| fieldformat completetime=strftime(completetime,"%Y-%m-%d %H:%M:%S") | eval duration=tostring(completetime-starttime,"duration")&lt;BR /&gt;| eval completeminutes=floor((completetime-starttime)/60)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When i select last 30 days:&lt;/P&gt;&lt;P&gt;it gives the latest log entry and the entry from a month ago.&amp;nbsp;&lt;/P&gt;&lt;P&gt;host starttime completetime completeminutes duration&lt;BR /&gt;hostname 2021-05-09 21:58:04 2021-05-10 05:09:17 431 07:11:12.247&lt;BR /&gt;hostname 2021-06-06 12:42:21 2021-06-06 12:50:10 7 00:07:49.396&lt;BR /&gt;hostname 2021-06-06 12:42:20 2021-06-06 12:50:05 7 00:07:45.268&lt;BR /&gt;hostname 2021-06-06 12:42:22 2021-06-06 12:50:25 8 00:08:03.316&lt;BR /&gt;hostname 2021-06-06 12:42:22 2021-06-06 12:51:01 8 00:08:38.956&lt;BR /&gt;hostname 2021-06-06 12:42:22 2021-06-06 12:49:58 7 00:07:35.255&lt;BR /&gt;hostname 2021-06-06 12:42:23 2021-06-06 12:49:50 7 00:07:27.548&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The search query though gives the log entry from every week:&lt;/P&gt;&lt;P&gt;host=hostname* "Index restore*"&lt;/P&gt;&lt;P&gt;Have the entries from&lt;BR /&gt;May 9th&lt;BR /&gt;May 15th&amp;nbsp;&lt;/P&gt;&lt;P&gt;May 23rd&lt;/P&gt;&lt;P&gt;May 30th&lt;/P&gt;&lt;P&gt;June 6th&lt;/P&gt;&lt;P&gt;Why am i not getting this in the statistics but get only the latest log entry?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 03:47:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/554810#M38559</guid>
      <dc:creator>praneethlekkala</dc:creator>
      <dc:date>2021-06-08T03:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Calculate Time Taken to Copy the Indexes</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/554829#M38565</link>
      <description>&lt;P&gt;You are not getting the other days because you didn't include the bin line to calculate the day and you didn't include day in the by clause of the stats command.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 06:39:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/554829#M38565</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-06-08T06:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Calculate Time Taken to Copy the Indexes</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/554838#M38566</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I modified the query&amp;nbsp; included bin however i couldn't fig out how to&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;include day in the by clause of the stats command.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;host=hostname* "Index restore*" | eval starttime=if(match(_raw,"Index restore started"),_time,null)&lt;BR /&gt;| eval completetime=if(match(_raw,"Index restore complete"),_time,null)&lt;BR /&gt;| stats latest(starttime) as starttime latest(completetime) as completetime by host | fieldformat starttime=strftime(starttime,"%Y-%m-%d %H:%M:%S")&lt;BR /&gt;| fieldformat completetime=strftime(completetime,"%Y-%m-%d %H:%M:%S") | eval duration=tostring(completetime-starttime,"duration")&lt;BR /&gt;| eval completeminutes=floor((completetime-starttime)/60) | bin span=30d _time&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 07:06:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/554838#M38566</guid>
      <dc:creator>praneethlekkala</dc:creator>
      <dc:date>2021-06-08T07:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Calculate Time Taken to Copy the Indexes</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/554841#M38567</link>
      <description>&lt;P&gt;As I showed earlier, the bin needs to be earlier on in the search and the day is just added to the stats command by clause&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;host=hostname* "Index restore*" 

| bin span=1d as day

| eval starttime=if(match(_raw,"Index restore started"),_time,null)
| eval completetime=if(match(_raw,"Index restore complete"),_time,null)

| stats latest(starttime) as starttime latest(completetime) as completetime by day host 

| fieldformat starttime=strftime(starttime,"%Y-%m-%d %H:%M:%S")
| fieldformat completetime=strftime(completetime,"%Y-%m-%d %H:%M:%S") | eval duration=tostring(completetime-starttime,"duration")
| eval completeminutes=floor((completetime-starttime)/60)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 07:21:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/554841#M38567</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-06-08T07:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Calculate Time Taken to Copy the Indexes</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/554843#M38568</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;Thanks&lt;/P&gt;&lt;P&gt;When i run the query it says "Error in 'bin' command: Invalid argument: 'day'"&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 07:34:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/554843#M38568</guid>
      <dc:creator>praneethlekkala</dc:creator>
      <dc:date>2021-06-08T07:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: Stats Calculate Time Taken to Copy the Indexes</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/554845#M38569</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Got it changed the bin query to "bin _time span=1d as day"&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following result is what i am getting&lt;/P&gt;&lt;P&gt;day&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; host starttime completetime completeminutes duration&lt;BR /&gt;1620532800 host 2021-05-09 21:58:04&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;1620619200 host 2021-05-10 05:09:17&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 07:43:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Stats-Calculate-Time-Taken-to-Copy-the-Indexes/m-p/554845#M38569</guid>
      <dc:creator>praneethlekkala</dc:creator>
      <dc:date>2021-06-08T07:43:21Z</dc:date>
    </item>
  </channel>
</rss>

