<?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: creating a report that shows indexedtime vs logged time for each hour in percentage. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/creating-a-report-that-shows-indexedtime-vs-logged-time-for-each/m-p/330478#M98373</link>
    <description>&lt;P&gt;You can't use a &lt;CODE&gt;where&lt;/CODE&gt; clause that eliminates all the events under 2 minutes, and then later get a percentage of the total, because you don't have the total.  &lt;/P&gt;

&lt;P&gt;Here's one way...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;earliest=-24h@h latest=@h index=nameoftheindex 
| eval GT2=if(_indextime-_time&amp;gt;=120,1,0)
| bin _time span=1h
| stats avg(GT2) as PctGT2 by _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;...or just ...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;earliest=-24h@h latest=@h index=nameoftheindex 
| eval GT2=if(_indextime-_time&amp;gt;=120,1,0)
| timechart avg(GT2) as PercentGreaterThan2minutes 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 08 Jun 2017 18:30:25 GMT</pubDate>
    <dc:creator>DalJeanis</dc:creator>
    <dc:date>2017-06-08T18:30:25Z</dc:date>
    <item>
      <title>creating a report that shows indexedtime vs logged time for each hour in percentage.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/creating-a-report-that-shows-indexedtime-vs-logged-time-for-each/m-p/330477#M98372</link>
      <description>&lt;P&gt;I want to create a chart separated by hours (24hours) that shows the number of data that took more than 2 mins to be indexed (indextime-time) and converted into percent.  The percent would be the total event that took over 2mins to be indexed divided by the total number of events for that hour.(for that 1 hour span)&lt;/P&gt;

&lt;P&gt;This is the basic search I'm using to calculate the events over 2mins &lt;BR /&gt;
index=nameoftheindex | eval time=_time | eval indextime=_indextime | eval diff=indextime-time | where diff&amp;gt;=120 | convert ctime(indextime) | convert ctime(time) fields sourcetype indextime time diff&lt;/P&gt;

&lt;P&gt;Any help would be helpful. Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:20:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/creating-a-report-that-shows-indexedtime-vs-logged-time-for-each/m-p/330477#M98372</guid>
      <dc:creator>mrtolu6</dc:creator>
      <dc:date>2020-09-29T14:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: creating a report that shows indexedtime vs logged time for each hour in percentage.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/creating-a-report-that-shows-indexedtime-vs-logged-time-for-each/m-p/330478#M98373</link>
      <description>&lt;P&gt;You can't use a &lt;CODE&gt;where&lt;/CODE&gt; clause that eliminates all the events under 2 minutes, and then later get a percentage of the total, because you don't have the total.  &lt;/P&gt;

&lt;P&gt;Here's one way...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;earliest=-24h@h latest=@h index=nameoftheindex 
| eval GT2=if(_indextime-_time&amp;gt;=120,1,0)
| bin _time span=1h
| stats avg(GT2) as PctGT2 by _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;...or just ...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;earliest=-24h@h latest=@h index=nameoftheindex 
| eval GT2=if(_indextime-_time&amp;gt;=120,1,0)
| timechart avg(GT2) as PercentGreaterThan2minutes 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 08 Jun 2017 18:30:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/creating-a-report-that-shows-indexedtime-vs-logged-time-for-each/m-p/330478#M98373</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-06-08T18:30:25Z</dc:date>
    </item>
    <item>
      <title>Re: creating a report that shows indexedtime vs logged time for each hour in percentage.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/creating-a-report-that-shows-indexedtime-vs-logged-time-for-each/m-p/330479#M98374</link>
      <description>&lt;P&gt;Thanks DalJeanis that worked. How do I add "%" at the end of PctGT2 results and also move the decimal space to places to the right?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2017 01:16:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/creating-a-report-that-shows-indexedtime-vs-logged-time-for-each/m-p/330479#M98374</guid>
      <dc:creator>mrtolu6</dc:creator>
      <dc:date>2017-06-09T01:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: creating a report that shows indexedtime vs logged time for each hour in percentage.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/creating-a-report-that-shows-indexedtime-vs-logged-time-for-each/m-p/330480#M98375</link>
      <description>&lt;P&gt;earliest=-24h@h latest=@h index=nameoftheindex &lt;BR /&gt;
 | eval GT2=if(_indextime-_time&amp;gt;=120,1,0)&lt;BR /&gt;
 | bin _time span=1h&lt;BR /&gt;
 | stats avg(GT2) as PctGT2 by _time&lt;BR /&gt;
  |eval PctGT2 = round(PctGT2*100,2)."%"&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:21:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/creating-a-report-that-shows-indexedtime-vs-logged-time-for-each/m-p/330480#M98375</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2020-09-29T14:21:11Z</dc:date>
    </item>
  </channel>
</rss>

