<?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: Timecharting delta by multiple fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Timecharting-delta-by-multiple-fields/m-p/338055#M100273</link>
    <description>&lt;P&gt;section 2, line 3 &lt;CODE&gt;| table _time delta_*&lt;/CODE&gt; &lt;/P&gt;

&lt;P&gt;If OP wants the highest change, positive or negative, then they can replace section 3 line 3 with this...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | untable _time metrics data | eval absdata=abs(data)| sort 0 -absdata by _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 06 Mar 2017 22:56:58 GMT</pubDate>
    <dc:creator>DalJeanis</dc:creator>
    <dc:date>2017-03-06T22:56:58Z</dc:date>
    <item>
      <title>Timecharting delta by multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timecharting-delta-by-multiple-fields/m-p/338052#M100270</link>
      <description>&lt;P&gt;My Sample event every minute looks like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;03/06/2017 15:19:00 -0500, app01:JVM1=12, app01:JVM2=6, app01:JVM3=9, app01:JVM4=3, app01:JVM6=7, app02:JVM1=14, app02:JVM2=0, app02:JVM3=0, app02:JVM4=25, app02:JVM5=11, app02:JVM6=4, app03:JVM1=5, app03:JVM2=9, app03:JVM3=5, app03:JVM4=26, app03:JVM5=10, app03:JVM6=2, app04:JVM1=13, app04:JVM2=4, app04:JVM3=10, app04:JVM4=16, app04:JVM5=13, app04:JVM6=0, app05:JVM1=10, app05:JVM2=47, app05:JVM3=21, app05:JVM4=15, app05:JVM5=13, app05:JVM6=2, app06:JVM1=8, app06:JVM2=8, app06:JVM3=10, app06:JVM4=8, app06:JVM5=8, app06:JVM6=6
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am able to plot the timechart per field - by using &lt;CODE&gt;| timechart max("app*:JVM*") span=1m&lt;/CODE&gt; or &lt;CODE&gt;avg&lt;/CODE&gt; function. &lt;BR /&gt;
But, now I need help in writing the queries to:&lt;BR /&gt;
1. Sort and show the top 10 key value pairs in a table - of the sum of values (off the 5 events) every 5 mins  in a dashboard&lt;BR /&gt;
2. Show the outliers off the timeframe's average in a table&lt;BR /&gt;
3. Sort and show the top 10 key value pairs with highest delta between timeframes (every 5 mins)&lt;/P&gt;

&lt;P&gt;In verbose mode, these keys are showing up in "Interesting Fields" but was not able to use them by field.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2017 20:28:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timecharting-delta-by-multiple-fields/m-p/338052#M100270</guid>
      <dc:creator>mudragada</dc:creator>
      <dc:date>2017-03-06T20:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: Timecharting delta by multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timecharting-delta-by-multiple-fields/m-p/338053#M100271</link>
      <description>&lt;P&gt;Here's a random test data generator &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start="01/25/2017:23:00:00" end="01/25/2017:23:10:00" increment=1m 
    | eval _time = starttime | table _time 
    | eval myapp="app01 app02 app03 app04 app05 app06" 
    | eval myjvm="JVM1 JVM2 JVM3 JVM4 JVM5 JVM6"
    | makemv myapp | mvexpand myapp |makemv myjvm | mvexpand myjvm 
    | eval rand1=round(random()/100000000,0) 
    | where rand1!=12 AND rand1!=22 AND rand1&amp;gt;0
    | rename rand1 as count
    | eval appJVM=myapp.":".myjvm
    | eval {appJVM} = count
    | table _time "app*:JVM*"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This generates transactions over a tenminute period for all of app01 thru app06 and JVM1 thru JVM6, then it pokes a few holes in the data because your posted data has holes.&lt;/P&gt;

&lt;P&gt;Then you can play with somesoni2's code to see what it does.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2017 21:23:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timecharting-delta-by-multiple-fields/m-p/338053#M100271</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-03-06T21:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: Timecharting delta by multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timecharting-delta-by-multiple-fields/m-p/338054#M100272</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;P&gt;1) Sort and show the top 10 key value pairs in a table - of the sum of values (off the 5 events) every 5 mins in a dashboard&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Your base search | timechart sum("app*:JVM*") span=5m | untable _time metrics data | sort 0 -data by _time
| dedup 10 _time | xyseries _time metrics data
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;2  Show the outliers off the timeframe's average in a table&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Your base search | timechart avg("app*:JVM*") span=1m 
| untable _time metrics data | eventstats avg(data) as avg stdev(data) as stdev by metrics | where data&amp;gt;(2*stdev+avg) OR data&amp;lt;(avg-2*stdev)  
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;3 Sort and show the top 10 key value pairs with highest delta between timeframes (every 5 mins)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Your base search | timechart sum("app*:JVM*") span=5m | streamstats values(*) as *_prev current=f window=1 
| foreach *_prev [eval delta_&amp;lt;&amp;lt;MATCHSTR&amp;gt;&amp;gt;='&amp;lt;&amp;lt;MATCHSTR&amp;gt;&amp;gt;'-'&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;'] | table _time detal_* 
| untable _time metrics data | sort 0 -data by _time
| dedup 10 _time | xyseries _time metrics data
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Mar 2017 21:31:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timecharting-delta-by-multiple-fields/m-p/338054#M100272</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-03-06T21:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: Timecharting delta by multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timecharting-delta-by-multiple-fields/m-p/338055#M100273</link>
      <description>&lt;P&gt;section 2, line 3 &lt;CODE&gt;| table _time delta_*&lt;/CODE&gt; &lt;/P&gt;

&lt;P&gt;If OP wants the highest change, positive or negative, then they can replace section 3 line 3 with this...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | untable _time metrics data | eval absdata=abs(data)| sort 0 -absdata by _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Mar 2017 22:56:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timecharting-delta-by-multiple-fields/m-p/338055#M100273</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-03-06T22:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: Timecharting delta by multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timecharting-delta-by-multiple-fields/m-p/338056#M100274</link>
      <description>&lt;P&gt;Did you mean highest POSITIVE delta or highest change, plus or minus?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2017 22:58:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timecharting-delta-by-multiple-fields/m-p/338056#M100274</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-03-06T22:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: Timecharting delta by multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timecharting-delta-by-multiple-fields/m-p/338057#M100275</link>
      <description>&lt;P&gt;I was looking for the absolute value, i.e., highest change.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2017 01:45:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timecharting-delta-by-multiple-fields/m-p/338057#M100275</guid>
      <dc:creator>mudragada</dc:creator>
      <dc:date>2017-03-07T01:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: Timecharting delta by multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timecharting-delta-by-multiple-fields/m-p/338058#M100276</link>
      <description>&lt;P&gt;okay, then use the minor addition I commented onto somesoni2's post.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2017 04:25:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timecharting-delta-by-multiple-fields/m-p/338058#M100276</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-03-07T04:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: Timecharting delta by multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timecharting-delta-by-multiple-fields/m-p/338059#M100277</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;In this case, makemv and mvexpand will create multiple events, correct? In a case where I scale up for the apps and JVMs over a timeline, what would be the ideal solve?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2017 04:51:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timecharting-delta-by-multiple-fields/m-p/338059#M100277</guid>
      <dc:creator>mudragada</dc:creator>
      <dc:date>2017-03-07T04:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: Timecharting delta by multiple fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Timecharting-delta-by-multiple-fields/m-p/338060#M100278</link>
      <description>&lt;P&gt;Correct.  If you wanted all the test data together in one field, for instance _raw, you could use this code replacing the code starting with line 8 above...&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | rename rand1 as count
 | eval appJVM=myapp.":".myjvm."=".count
 | stats values(appJVM) as appJVM by _time
 | nomv appJVM
 | rename appJVM as _raw
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Sorry, I don't understand the followup question. &lt;/P&gt;</description>
      <pubDate>Fri, 24 Mar 2017 17:00:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Timecharting-delta-by-multiple-fields/m-p/338060#M100278</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-03-24T17:00:09Z</dc:date>
    </item>
  </channel>
</rss>

