<?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 count by Week not using Splunk Timestamp in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-by-Week-not-using-Splunk-Timestamp/m-p/206930#M60295</link>
    <description>&lt;P&gt;Is there any way to filter out completed/closed events?  For example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="Respond" sourcetype=Ticket queue="Incident" status!="closed"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 22 Dec 2015 13:54:13 GMT</pubDate>
    <dc:creator>dcarmack_splunk</dc:creator>
    <dc:date>2015-12-22T13:54:13Z</dc:date>
    <item>
      <title>How to count by Week not using Splunk Timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-by-Week-not-using-Splunk-Timestamp/m-p/206924#M60289</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Problem&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I want to be able to create a timechart that outlines the company's incident count by week.&lt;/P&gt;

&lt;P&gt;The issue I have is many incidents are created in one week but then resolved in the following week. That final event is then shown in the following weeks figures. &lt;/P&gt;

&lt;P&gt;The way I have gotten around this before when searching a specific timeframe is by creating a start &amp;amp; end timestamp and having the Dates_Created field fall between the two times. However I am unsure how to use this in a week by week case. &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Example:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval startstamp=strftime(relative_time(now(),"-mon@mon"),"%Y-%m-%d %H:%M:%S") 
| eval endstamp=strftime(relative_time(now(), "-1s"),"%Y-%m-%d %H:%M:%S")  
| where Dates_Created &amp;gt;= startstamp AND Dates_Created &amp;lt; endstamp
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Query&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;This query currently shows me all &lt;STRONG&gt;events that have occurred&lt;/STRONG&gt; on a week by week basis. However I want it to shows &lt;STRONG&gt;all tickets that were created (Dates_Created)&lt;/STRONG&gt; on a week by week basis.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| index="Respond" sourcetype=Ticket queue="Incident"  earliest=-42d@d latest=now 
| dedup ticket   
| eval week_month=strftime(_time, "%V") 
| bucket span=7d _time
| chart count by week_month
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any help will be greatly appreciated&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2015 12:12:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-by-Week-not-using-Splunk-Timestamp/m-p/206924#M60289</guid>
      <dc:creator>mjd555</dc:creator>
      <dc:date>2015-12-22T12:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to count by Week not using Splunk Timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-by-Week-not-using-Splunk-Timestamp/m-p/206925#M60290</link>
      <description>&lt;P&gt;Try This!&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index="Respond" sourcetype=Ticket queue="Incident" 
       [|gentimes start=-42|eval Dates_Created=strftime(starttime,"%Y-%m-%d*")|fields Dates_Created]
 | dedup ticket   
 | eval week_month=strftime(_time, "%V") 
 | bucket span=7d _time
 | chart count by week_month
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;※Date_Created is the field of string.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2015 12:56:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-by-Week-not-using-Splunk-Timestamp/m-p/206925#M60290</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2015-12-22T12:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to count by Week not using Splunk Timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-by-Week-not-using-Splunk-Timestamp/m-p/206926#M60291</link>
      <description>&lt;P&gt;Hello, I'm afraid that is still returning the same values as before&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2015 13:06:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-by-Week-not-using-Splunk-Timestamp/m-p/206926#M60291</guid>
      <dc:creator>mjd555</dc:creator>
      <dc:date>2015-12-22T13:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to count by Week not using Splunk Timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-by-Week-not-using-Splunk-Timestamp/m-p/206927#M60292</link>
      <description>&lt;P&gt;It cant be this simple can it?  Narrowing your search to just those that have Date_Created= (something):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | index="Respond" sourcetype=Ticket queue="Incident"  earliest=-42d@d latest=now Date_Created=*
 | dedup ticket   
 | eval week_month=strftime(_time, "%V") 
 | bucket span=7d _time
 | chart count by week_month
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If not, then I need an example of your Date_Created field data so that I can give you proper command.  It will be something like this:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;...| eval _time=strptime(Date_Created, "%+") | ... | timechart ...&lt;/CODE&gt;  &amp;lt;- after the eval, _time will be Date_Created instead... and then when you feed it into your timechart, _time will still = Date_created.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:16:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-by-Week-not-using-Splunk-Timestamp/m-p/206927#M60292</guid>
      <dc:creator>jkat54</dc:creator>
      <dc:date>2020-09-29T08:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to count by Week not using Splunk Timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-by-Week-not-using-Splunk-Timestamp/m-p/206928#M60293</link>
      <description>&lt;P&gt;Afraid not as there is always data within the Dates_Created field. An example of data would be:&lt;/P&gt;

&lt;P&gt;2015-12-11 04:58:19&lt;/P&gt;

&lt;P&gt;The above ticket was created on this date, however it was resolved today so there was an event created on today's date.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2015 13:13:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-by-Week-not-using-Splunk-Timestamp/m-p/206928#M60293</guid>
      <dc:creator>mjd555</dc:creator>
      <dc:date>2015-12-22T13:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to count by Week not using Splunk Timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-by-Week-not-using-Splunk-Timestamp/m-p/206929#M60294</link>
      <description>&lt;P&gt;Make sure the search statement on the "Search job inspector".&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2015 13:14:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-by-Week-not-using-Splunk-Timestamp/m-p/206929#M60294</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2015-12-22T13:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to count by Week not using Splunk Timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-by-Week-not-using-Splunk-Timestamp/m-p/206930#M60295</link>
      <description>&lt;P&gt;Is there any way to filter out completed/closed events?  For example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="Respond" sourcetype=Ticket queue="Incident" status!="closed"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Dec 2015 13:54:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-by-Week-not-using-Splunk-Timestamp/m-p/206930#M60295</guid>
      <dc:creator>dcarmack_splunk</dc:creator>
      <dc:date>2015-12-22T13:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to count by Week not using Splunk Timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-by-Week-not-using-Splunk-Timestamp/m-p/206931#M60296</link>
      <description>&lt;P&gt;why not just do &lt;/P&gt;

&lt;P&gt;... | bucket span=7d _time | stats dc(ticket) AS ticket_count by _time&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 08:12:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-by-Week-not-using-Splunk-Timestamp/m-p/206931#M60296</guid>
      <dc:creator>dcarmack_splunk</dc:creator>
      <dc:date>2020-09-29T08:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to count by Week not using Splunk Timestamp</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-count-by-Week-not-using-Splunk-Timestamp/m-p/206932#M60297</link>
      <description>&lt;P&gt;You can use the &lt;CODE&gt;concurrency&lt;/CODE&gt; command and then count "concurrencies" at any given time:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.0/SearchReference/Concurrency"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.0/SearchReference/Concurrency&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2015 14:54:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-count-by-Week-not-using-Splunk-Timestamp/m-p/206932#M60297</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-12-22T14:54:04Z</dc:date>
    </item>
  </channel>
</rss>

