<?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: How to query for a Week over Week count of hosts reporting to Splunk in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-query-for-a-Week-over-Week-count-of-hosts-reporting-to/m-p/237317#M188633</link>
    <description>&lt;P&gt;I have my query like below, but the problem is it shows the same date on both last weeks and this weeks chart  when i mouse on the bar chart.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index = isell sourcetype=iSell_sessionslog Region = EU BusinessServiceName= BsSaveSalesOrderList Success = False earliest=-2w@w latest=@w |bucket span=1d _time | eval marker=if (_time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 11 Oct 2016 17:38:56 GMT</pubDate>
    <dc:creator>sushe10</dc:creator>
    <dc:date>2016-10-11T17:38:56Z</dc:date>
    <item>
      <title>How to query for a Week over Week count of hosts reporting to Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-query-for-a-Week-over-Week-count-of-hosts-reporting-to/m-p/237313#M188629</link>
      <description>&lt;P&gt;Is there a better way to report the count of hosts reporting to Splunk week over week other than running the query using &lt;CODE&gt;index=*&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;I am not looking for the no of forwarders, I am looking distinct count of  &lt;CODE&gt;host&lt;/CODE&gt; value in all the indexes, |metadata type=hosts do not help as it cannot be used for week over week calculation&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=* earliest=-2w@w latest=@w 
| bucket span=1d _time
| stats count by _time host 
| eval marker=if (_time&amp;lt;relative_time(now(),"-w@w"), "last week","this week")
| eval _time=if(marker=="last week", _time + 7*24*60*60, _time)
| timechart count by marker
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 07 Mar 2016 21:52:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-query-for-a-Week-over-Week-count-of-hosts-reporting-to/m-p/237313#M188629</guid>
      <dc:creator>mohankesireddy</dc:creator>
      <dc:date>2016-03-07T21:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to query for a Week over Week count of hosts reporting to Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-query-for-a-Week-over-Week-count-of-hosts-reporting-to/m-p/237314#M188630</link>
      <description>&lt;P&gt;A faster option is to use the tstats which works on tsidx files, metadata fields including _time. Try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats count WHERE index=* AND (host=slc* OR host=phx* OR host=dcg* OR host=ccg*)  earliest=-2w@w latest=@w  by _time host  | eval marker=if (_time&amp;lt;relative_time(now(),"-w@w"), "last week","this week")
 | eval _time=if(marker=="last week", _time + 7*24*60*60, _time)
 | timechart count by marker
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 07 Mar 2016 21:58:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-query-for-a-Week-over-Week-count-of-hosts-reporting-to/m-p/237314#M188630</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-03-07T21:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to query for a Week over Week count of hosts reporting to Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-query-for-a-Week-over-Week-count-of-hosts-reporting-to/m-p/237315#M188631</link>
      <description>&lt;P&gt;Thanks Somesh&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2016 22:37:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-query-for-a-Week-over-Week-count-of-hosts-reporting-to/m-p/237315#M188631</guid>
      <dc:creator>mohankesireddy</dc:creator>
      <dc:date>2016-03-07T22:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to query for a Week over Week count of hosts reporting to Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-query-for-a-Week-over-Week-count-of-hosts-reporting-to/m-p/237316#M188632</link>
      <description>&lt;P&gt;Also, for your presentation once you pull the data out, tihink about using &lt;CODE&gt;timewrap&lt;/CODE&gt; app:&lt;BR /&gt;
&lt;A href="https://splunkbase.splunk.com/app/1645/"&gt;https://splunkbase.splunk.com/app/1645/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Mar 2016 22:47:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-query-for-a-Week-over-Week-count-of-hosts-reporting-to/m-p/237316#M188632</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-03-07T22:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to query for a Week over Week count of hosts reporting to Splunk</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-query-for-a-Week-over-Week-count-of-hosts-reporting-to/m-p/237317#M188633</link>
      <description>&lt;P&gt;I have my query like below, but the problem is it shows the same date on both last weeks and this weeks chart  when i mouse on the bar chart.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index = isell sourcetype=iSell_sessionslog Region = EU BusinessServiceName= BsSaveSalesOrderList Success = False earliest=-2w@w latest=@w |bucket span=1d _time | eval marker=if (_time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Oct 2016 17:38:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-query-for-a-Week-over-Week-count-of-hosts-reporting-to/m-p/237317#M188633</guid>
      <dc:creator>sushe10</dc:creator>
      <dc:date>2016-10-11T17:38:56Z</dc:date>
    </item>
  </channel>
</rss>

