<?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: timechart with stats and eval in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169221#M48328</link>
    <description>&lt;P&gt;Wouldn't the &lt;CODE&gt;timechart count by TEST1&lt;/CODE&gt; always yield a count of 1? There can only be one &lt;CODE&gt;dc(WEB_IP) by WEBURL&lt;/CODE&gt; row for every &lt;CODE&gt;TEST1&lt;/CODE&gt; because it contains the &lt;CODE&gt;WEBURL&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;Bottom line, I'm not quite sure what @subtrakt is even looking for as the result.&lt;/P&gt;</description>
    <pubDate>Sat, 17 May 2014 23:01:18 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2014-05-17T23:01:18Z</dc:date>
    <item>
      <title>timechart with stats and eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169217#M48324</link>
      <description>&lt;P&gt;Hi, &lt;BR /&gt;
Here's my query - &lt;/P&gt;

&lt;P&gt;... 500 | stats dc(WEB_IP) as TEST2 | eval TEST1=WEBURL." ".TEST2 | timechart count by TEST1&lt;/P&gt;

&lt;P&gt;Seems simple but i am not having any luck getting the timechart to work.&lt;/P&gt;

&lt;P&gt;The end result will be a chart that shows URLs [WEBURL] experiencing 500 errors and &lt;BR /&gt;
in the chart legend [TEST1], the URL will be displayed and a count beside it that shows how many different IPs [dc(WEB_IP)] have experienced a 500.  &lt;/P&gt;</description>
      <pubDate>Sat, 17 May 2014 20:14:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169217#M48324</guid>
      <dc:creator>subtrakt</dc:creator>
      <dc:date>2014-05-17T20:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: timechart with stats and eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169218#M48325</link>
      <description>&lt;PRE&gt;&lt;CODE&gt; ...500 | stats dc(WEB_IP) as TEST2 by _time | eval TEST1=WEBURL." ".TEST2 | timechart count by TEST1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 17 May 2014 20:41:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169218#M48325</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2014-05-17T20:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: timechart with stats and eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169219#M48326</link>
      <description>&lt;P&gt;There's no field &lt;CODE&gt;WEBURL&lt;/CODE&gt; after the &lt;CODE&gt;stats&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Sat, 17 May 2014 22:53:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169219#M48326</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-05-17T22:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: timechart with stats and eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169220#M48327</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...500 | eventstats dc(WEB_IP) as TEST2  by WEBURL| eval TEST1=WEBURL." ".TEST2 |timechart count by TEST1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Updated 2:&lt;/P&gt;

&lt;P&gt;try this&lt;/P&gt;

&lt;P&gt;The subsearch ensures that only the top 10 WEBURL (based on count) are included in search.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; ...500 [search ...500 | top limit=10 WEBURL | table WEBURL | format] | eventstats dc(WEB_IP) as TEST2  by WEBURL | eval TEST1=WEBURL." ".TEST2 |timechart count by TEST1
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 17 May 2014 22:53:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169220#M48327</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-05-17T22:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: timechart with stats and eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169221#M48328</link>
      <description>&lt;P&gt;Wouldn't the &lt;CODE&gt;timechart count by TEST1&lt;/CODE&gt; always yield a count of 1? There can only be one &lt;CODE&gt;dc(WEB_IP) by WEBURL&lt;/CODE&gt; row for every &lt;CODE&gt;TEST1&lt;/CODE&gt; because it contains the &lt;CODE&gt;WEBURL&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;Bottom line, I'm not quite sure what @subtrakt is even looking for as the result.&lt;/P&gt;</description>
      <pubDate>Sat, 17 May 2014 23:01:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169221#M48328</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-05-17T23:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: timechart with stats and eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169222#M48329</link>
      <description>&lt;P&gt;Thats the issue with question with fewer information. Based on the information available, a chart showing URL with 500 error and with URL show the distinct no of IPs using that URL with 500 error was required. Not sure whether a timechart is necessary or not. Up to the @subtrakt to confirm. Request him to provide more information.&lt;/P&gt;</description>
      <pubDate>Sat, 17 May 2014 23:21:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169222#M48329</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-05-17T23:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: timechart with stats and eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169223#M48330</link>
      <description>&lt;P&gt;That works beautifully thanks somesoni2! To add to this and reduce noise, does anyone know how to show only URLS with &amp;gt; 10 500s in the search range? ... | eventstats dc(WEB_IP) as TEST2 by WEBURL | where WEBURL &amp;gt; 10&lt;/P&gt;</description>
      <pubDate>Sat, 17 May 2014 23:30:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169223#M48330</guid>
      <dc:creator>subtrakt</dc:creator>
      <dc:date>2014-05-17T23:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: timechart with stats and eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169224#M48331</link>
      <description>&lt;P&gt;above is my first guess but eventstats doesn't count that way apparently.&lt;/P&gt;</description>
      <pubDate>Sat, 17 May 2014 23:30:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169224#M48331</guid>
      <dc:creator>subtrakt</dc:creator>
      <dc:date>2014-05-17T23:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: timechart with stats and eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169225#M48332</link>
      <description>&lt;P&gt;Give a try to updated answer.&lt;/P&gt;</description>
      <pubDate>Sat, 17 May 2014 23:40:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169225#M48332</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-05-17T23:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: timechart with stats and eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169226#M48333</link>
      <description>&lt;P&gt;Unfortunately, that came back with an empty chart. Now that i think about it, If i could sort the timechart by the highest dc(WEB_IP) count and set the timechart for useother=f  that would be the best option.  I put "timechart... | sort WEB_IP"  but it didn't seem to reflect the low end of the spectrum when i did "| sort -WEB_IP" and the high end of the spectrum when i did "| sort WEB_IP"&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:39:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169226#M48333</guid>
      <dc:creator>subtrakt</dc:creator>
      <dc:date>2020-09-28T16:39:05Z</dc:date>
    </item>
    <item>
      <title>Re: timechart with stats and eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169227#M48334</link>
      <description>&lt;P&gt;See if new answer works.&lt;/P&gt;</description>
      <pubDate>Sun, 18 May 2014 00:28:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169227#M48334</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-05-18T00:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: timechart with stats and eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169228#M48335</link>
      <description>&lt;P&gt;That works if i'm trying to get the most-hit-URL.  But if a single IP is causing noise - that would not be the goal of the chart.  I was hoping i could do something like this  -    "...| eventstats dc(WEB_IP) as TEST2  by WEBURL| eval TEST1=WEBURL." ".TEST2 | timechart count limit=10 by TEST1 | sort - TEST2" and that would show the URLs with highest dc(WEB_IP) count.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:39:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169228#M48335</guid>
      <dc:creator>subtrakt</dc:creator>
      <dc:date>2020-09-28T16:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: timechart with stats and eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169229#M48336</link>
      <description>&lt;P&gt;How about this&lt;/P&gt;

&lt;P&gt;...| eventstats dc(WEB_IP) as TEST2 by WEBURL | sort -TEST2 | streamstats window=1 current=f last(TEST2) as prevTEST2 | eval sno=case(isnull(prevTEST2),1,prevTEST2=TEST2,0,1=1,1) | accum sno | where sno &amp;lt; 11 | eval TEST1=WEBURL." ".TEST2 |timechart count by TEST1&lt;/P&gt;</description>
      <pubDate>Sun, 18 May 2014 18:25:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169229#M48336</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-05-18T18:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: timechart with stats and eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169230#M48337</link>
      <description>&lt;P&gt;Bravo! that is impressive! I'm going to have to do some research and learn what all this means.&lt;/P&gt;</description>
      <pubDate>Sun, 18 May 2014 20:18:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169230#M48337</guid>
      <dc:creator>subtrakt</dc:creator>
      <dc:date>2014-05-18T20:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: timechart with stats and eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169231#M48338</link>
      <description>&lt;P&gt;looks like on a 2 hour search the search is somehow dropping off data on the middle of the chart(1hour).  i was thinking window=1 might have something to do with it.&lt;/P&gt;</description>
      <pubDate>Sun, 18 May 2014 21:04:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169231#M48338</guid>
      <dc:creator>subtrakt</dc:creator>
      <dc:date>2014-05-18T21:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: timechart with stats and eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169232#M48339</link>
      <description>&lt;P&gt;&lt;CODE&gt;window=1 current=f&lt;/CODE&gt; is telling the &lt;CODE&gt;streamstats&lt;/CODE&gt; command to use the previous row for grabbing &lt;CODE&gt;last(TEST2) as prevTEST2&lt;/CODE&gt; - that's unrelated to the time range.&lt;/P&gt;</description>
      <pubDate>Sun, 18 May 2014 22:13:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169232#M48339</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-05-18T22:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: timechart with stats and eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169233#M48340</link>
      <description>&lt;P&gt;Thanks Martin.  I added some filters to decrease the search results and it seems to be working fine now.&lt;/P&gt;</description>
      <pubDate>Sun, 18 May 2014 23:52:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timechart-with-stats-and-eval/m-p/169233#M48340</guid>
      <dc:creator>subtrakt</dc:creator>
      <dc:date>2014-05-18T23:52:07Z</dc:date>
    </item>
  </channel>
</rss>

