<?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: I want to delete fields whose total value is less than the threshold on a timechart. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/I-want-to-delete-fields-whose-total-value-is-less-than-the/m-p/488676#M136493</link>
    <description>&lt;P&gt;thank you for reply, @darrenfuller &lt;BR /&gt;
&lt;CODE&gt;tstats&lt;/CODE&gt; is faster.&lt;BR /&gt;
but it can't be used any time.&lt;/P&gt;

&lt;P&gt;I will ask a little more.&lt;/P&gt;</description>
    <pubDate>Tue, 10 Mar 2020 00:18:49 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-03-10T00:18:49Z</dc:date>
    <item>
      <title>I want to delete fields whose total value is less than the threshold on a timechart.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-want-to-delete-fields-whose-total-value-is-less-than-the/m-p/488670#M136487</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=_internal
| eventstats count by sourcetype
| where count &amp;gt; 100
| timechart span=1m count by sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;note:earliest=-60m&lt;/P&gt;

&lt;P&gt;if the total is less than the threshold, I don't want to display the field.&lt;BR /&gt;
 &lt;CODE&gt;eventstats&lt;/CODE&gt; calculate all events , which is inefficient.&lt;/P&gt;

&lt;P&gt;Is there any other good way?&lt;/P&gt;</description>
      <pubDate>Sun, 08 Mar 2020 09:39:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-want-to-delete-fields-whose-total-value-is-less-than-the/m-p/488670#M136487</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-03-08T09:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: I want to delete fields whose total value is less than the threshold on a timechart.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-want-to-delete-fields-whose-total-value-is-less-than-the/m-p/488671#M136488</link>
      <description>&lt;P&gt;How about using subsearch? I found below query faster than one in the question.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal earliest=-60m 
    [ search index=_internal earliest=-60m 
    | stats count by sourcetype 
    | where count &amp;gt; 100 
    | fields sourcetype] 
| timechart span=1m count by sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 08 Mar 2020 16:58:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-want-to-delete-fields-whose-total-value-is-less-than-the/m-p/488671#M136488</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2020-03-08T16:58:05Z</dc:date>
    </item>
    <item>
      <title>Re: I want to delete fields whose total value is less than the threshold on a timechart.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-want-to-delete-fields-whose-total-value-is-less-than-the/m-p/488672#M136489</link>
      <description>&lt;P&gt;thank you for reply, @manjunathmeti&lt;BR /&gt;
Certainly it is faster than &lt;CODE&gt;eventstats&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;I will ask a little more.&lt;/P&gt;

&lt;P&gt;faster:&lt;BR /&gt;
&lt;CODE&gt;eventstats&lt;/CODE&gt; &amp;lt; &lt;CODE&gt;subsearch stats&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Mar 2020 20:04:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-want-to-delete-fields-whose-total-value-is-less-than-the/m-p/488672#M136489</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-03-08T20:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: I want to delete fields whose total value is less than the threshold on a timechart.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-want-to-delete-fields-whose-total-value-is-less-than-the/m-p/488673#M136490</link>
      <description>&lt;P&gt;Timechart with where clause&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal earliest=-60m 
| timechart useother=false span=1m count by sourcetype WHERE count &amp;gt; 100
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 09 Mar 2020 03:44:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-want-to-delete-fields-whose-total-value-is-less-than-the/m-p/488673#M136490</guid>
      <dc:creator>spayneort</dc:creator>
      <dc:date>2020-03-09T03:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: I want to delete fields whose total value is less than the threshold on a timechart.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-want-to-delete-fields-whose-total-value-is-less-than-the/m-p/488674#M136491</link>
      <description>&lt;P&gt;thank you for reply, @spayneort&lt;BR /&gt;
Certainly it is faster than &lt;CODE&gt;subsearch stats&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;I will ask a little more.&lt;/P&gt;

&lt;P&gt;faster:&lt;BR /&gt;
&lt;CODE&gt;eventstats&lt;/CODE&gt; &amp;lt; &lt;CODE&gt;subsearch stats&lt;/CODE&gt; &amp;lt; &lt;CODE&gt;timechart where&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2020 04:41:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-want-to-delete-fields-whose-total-value-is-less-than-the/m-p/488674#M136491</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-03-09T04:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: I want to delete fields whose total value is less than the threshold on a timechart.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-want-to-delete-fields-whose-total-value-is-less-than-the/m-p/488675#M136492</link>
      <description>&lt;P&gt;Well...if we're counting by sourcetype, let me throw this into the ring: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count where index=_internal [| tstats count where index=_internal earliest=-60m by sourcetype 
                                      | search count &amp;gt; 100 
                                      | fields - count 
                                      | format] 
  by _time span=1m sourcetype
| timechart span=1m sum(count) as count by sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Mind you, this won't work if you are not working with an OOB Accelerated, or data model, or indexed extraction..ed field...   but in this specific case it's marvelous. &lt;/P&gt;

&lt;P&gt;./DF&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2020 14:43:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-want-to-delete-fields-whose-total-value-is-less-than-the/m-p/488675#M136492</guid>
      <dc:creator>darrenfuller</dc:creator>
      <dc:date>2020-03-09T14:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: I want to delete fields whose total value is less than the threshold on a timechart.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-want-to-delete-fields-whose-total-value-is-less-than-the/m-p/488676#M136493</link>
      <description>&lt;P&gt;thank you for reply, @darrenfuller &lt;BR /&gt;
&lt;CODE&gt;tstats&lt;/CODE&gt; is faster.&lt;BR /&gt;
but it can't be used any time.&lt;/P&gt;

&lt;P&gt;I will ask a little more.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 00:18:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-want-to-delete-fields-whose-total-value-is-less-than-the/m-p/488676#M136493</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-03-10T00:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: I want to delete fields whose total value is less than the threshold on a timechart.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-want-to-delete-fields-whose-total-value-is-less-than-the/m-p/488677#M136494</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal
| timechart span=1m count by sourcetype
| rename _span AS span
| untable _time sourcetype count
| eventstats sum(count) AS sourcetype_count BY sourcetype
| where sourcetype_count &amp;gt; 100
| xyseries _time sourcetype count
| rename span AS _span
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or, even better:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|tstats count WHERE index=_internal BY sourcetype _time span=1m
| eventstats sum(count) AS sourcetype_count BY sourcetype
| where sourcetype_count &amp;gt; 100
| timechart span=1m count by sourcetype
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Mar 2020 01:25:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-want-to-delete-fields-whose-total-value-is-less-than-the/m-p/488677#M136494</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2020-03-10T01:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: I want to delete fields whose total value is less than the threshold on a timechart.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-want-to-delete-fields-whose-total-value-is-less-than-the/m-p/488678#M136495</link>
      <description>&lt;P&gt;thank you for reply, @woodcock&lt;BR /&gt;
Certainly it is faster than &lt;CODE&gt;timechart where&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;faster:&lt;BR /&gt;
&lt;CODE&gt;eventstats &amp;lt;&amp;lt;&amp;lt; subsearch stats &amp;lt;&amp;lt; timechart where &amp;lt; untable and xyseries&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 04:32:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-want-to-delete-fields-whose-total-value-is-less-than-the/m-p/488678#M136495</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-03-10T04:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: I want to delete fields whose total value is less than the threshold on a timechart.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-want-to-delete-fields-whose-total-value-is-less-than-the/m-p/488679#M136496</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=_internal
| timechart usenull=f useother=f limit=0 span=1m count by sourcetype
| addcoltotals labelfield=_time label=total
| transpose 0 header_field=_time
| where total &amp;gt;100
| transpose 0 column_name=_time header_field=column
| where _time!="total"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is the fastest in normal SPL.&lt;BR /&gt;
&lt;CODE&gt;timechart&lt;/CODE&gt; option, &lt;CODE&gt;usenull&lt;/CODE&gt; &lt;CODE&gt;useother&lt;/CODE&gt; &lt;CODE&gt;limit&lt;/CODE&gt; all are off, it is faster in this case. &lt;/P&gt;

&lt;P&gt;Thank you all.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Conclusion:&lt;/STRONG&gt;&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;Use &lt;CODE&gt;tstats&lt;/CODE&gt;. It is the fastest. However, it may not be available.&lt;/LI&gt;
&lt;LI&gt;Use &lt;CODE&gt;where clause&lt;/CODE&gt;. this is easy to understand and faster.&lt;/LI&gt;
&lt;LI&gt;To dashboard, @woodcock or @to4kawa 's solution is good.
they are more faster and useful. Of course, you can use it ordinary.&lt;/LI&gt;
&lt;LI&gt;&lt;EM&gt;subsearch&lt;/EM&gt; can reduce the number of searches. &lt;/LI&gt;
&lt;LI&gt;&lt;CODE&gt;eventstats&lt;/CODE&gt; is slow. It is better to use another way.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;@spayneort &lt;BR /&gt;
 your solution is good and fast.&lt;BR /&gt;
I want to describe it more, so I made it like this. sorry.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 04:59:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-want-to-delete-fields-whose-total-value-is-less-than-the/m-p/488679#M136496</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-03-10T04:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: I want to delete fields whose total value is less than the threshold on a timechart.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-want-to-delete-fields-whose-total-value-is-less-than-the/m-p/488680#M136497</link>
      <description>&lt;P&gt;So I win then?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 05:33:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-want-to-delete-fields-whose-total-value-is-less-than-the/m-p/488680#M136497</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2020-03-10T05:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: I want to delete fields whose total value is less than the threshold on a timechart.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-want-to-delete-fields-whose-total-value-is-less-than-the/m-p/488681#M136498</link>
      <description>&lt;P&gt;my query is faster a little .&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 05:52:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-want-to-delete-fields-whose-total-value-is-less-than-the/m-p/488681#M136498</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-03-10T05:52:56Z</dc:date>
    </item>
  </channel>
</rss>

