<?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: Splunk Count for last 30 days in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Count-for-last-30-days/m-p/562371#M195583</link>
    <description>&lt;P&gt;I don't understand how this search gives you the results you have - can you share some raw events from you csv files?&lt;/P&gt;</description>
    <pubDate>Fri, 06 Aug 2021 07:09:17 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2021-08-06T07:09:17Z</dc:date>
    <item>
      <title>Splunk Count for last 30 days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Count-for-last-30-days/m-p/561611#M195362</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have written a script which runs for every after 1 hr, here the 24 hr window is from 07am to next day 06:00am&lt;/P&gt;&lt;P&gt;My requirement is to provide a monthly count of the report but should only consider the last log file 06:00 am which contains all the updated information for the day&lt;/P&gt;&lt;P&gt;index=XX host=XX source="abc_YYYYMMDD.csv"&lt;BR /&gt;| dedup _raw&lt;BR /&gt;| fields source A B C | replace abc*.csv WITH * in source&lt;BR /&gt;| eval source=strftime(strptime(source,"%Y%m%d"),"%d-%B-%Y")&lt;BR /&gt;| eval jobs=A+B+C&lt;BR /&gt;| dedup jobs&lt;BR /&gt;| stats count(jobs) by source - this display all the events but I want to only the last log file count.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Aug 2021 08:34:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Count-for-last-30-days/m-p/561611#M195362</guid>
      <dc:creator>sachin9911</dc:creator>
      <dc:date>2021-08-01T08:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Count for last 30 days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Count-for-last-30-days/m-p/561615#M195363</link>
      <description>&lt;P&gt;It is not clear what data you are dealing with. Is it that you just want the last event in the log for each A B C combination?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats last(jobs) as jobs by source A B C&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 01 Aug 2021 09:38:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Count-for-last-30-days/m-p/561615#M195363</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-08-01T09:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Count for last 30 days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Count-for-last-30-days/m-p/561672#M195373</link>
      <description>&lt;P&gt;I am looking for the total number of record for the last log file created.&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;07:00 am - log_20210801.csv&amp;nbsp; &amp;nbsp; --count = 14000&lt;/P&gt;&lt;P&gt;08:00 am - log_20210801.csv&amp;nbsp; &amp;nbsp; -- count = 14500 (file will overwrite)&lt;/P&gt;&lt;P&gt;and so on.. until&amp;nbsp; next day&amp;nbsp;&lt;/P&gt;&lt;P&gt;06:00am -log_20210801.csv&amp;nbsp; &amp;nbsp; &amp;nbsp; -- count = 17000&amp;nbsp;(file will overwrite and contain the final update events for&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;the day)&lt;/P&gt;&lt;P&gt;07:00am -log_20210802.csv&amp;nbsp; &amp;nbsp; &amp;nbsp; -- count 16000 until&lt;/P&gt;&lt;P&gt;06:00am&amp;nbsp; -log_20210802.csv&amp;nbsp; &amp;nbsp; &amp;nbsp;-- count 20000 (file will overwrite)&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;here number of records in last log files are 17000 and 20000 need this value only and using the logic will perform search for last 30 days to create a bar diagram to visually display the trend&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Aug 2021 09:30:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Count-for-last-30-days/m-p/561672#M195373</guid>
      <dc:creator>sachin9911</dc:creator>
      <dc:date>2021-08-02T09:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Count for last 30 days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Count-for-last-30-days/m-p/561684#M195378</link>
      <description>&lt;P&gt;If you did this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=XX host=XX source="abc_20210801.csv"
| stats count&lt;/LI-CODE&gt;&lt;P&gt;Would you get 14000 at 7am (or just after at least) and 14500 at 8am, or 14000 at 7am and 28500 at 8am?&lt;/P&gt;&lt;P&gt;Assuming you want more than one source to be considered, what do you get if you do this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=XX host=XX source="abc_*.csv"
| stats count by source&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 02 Aug 2021 12:40:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Count-for-last-30-days/m-p/561684#M195378</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-08-02T12:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Count for last 30 days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Count-for-last-30-days/m-p/562195#M195525</link>
      <description>&lt;P&gt;the query displays the total count for all the runs&lt;/P&gt;&lt;P&gt;example:&amp;nbsp;&lt;/P&gt;&lt;P&gt;1Aug - 07am (count = 14000),&amp;nbsp;&amp;nbsp; 08 am (count=15000), ... Next day 06:00 am(18000)&amp;nbsp;&lt;/P&gt;&lt;P&gt;2 Aug -&amp;nbsp;07am (count = 11000),&amp;nbsp;&amp;nbsp; 08 am (count=12500), ... Next day 06:00 am(19500)&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;... so on until&lt;/P&gt;&lt;P&gt;30th Aug&amp;nbsp;&amp;nbsp;-&amp;nbsp;07am (count = 2000),&amp;nbsp;&amp;nbsp; 08 am (count=10000), ... Next day 06:00 am(12500)&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My requirement is to only get the last count of the day i.e&lt;/P&gt;&lt;P&gt;1 Aug (18000) , 2 Aug (19500) ... 30th Aug (12500)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 07:20:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Count-for-last-30-days/m-p/562195#M195525</guid>
      <dc:creator>sachin9911</dc:creator>
      <dc:date>2021-08-05T07:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Count for last 30 days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Count-for-last-30-days/m-p/562197#M195527</link>
      <description>&lt;P&gt;What is the search you are using to get these results?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 07:42:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Count-for-last-30-days/m-p/562197#M195527</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-08-05T07:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Count for last 30 days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Count-for-last-30-days/m-p/562349#M195575</link>
      <description>&lt;P&gt;index=XXX&amp;nbsp; host=XXX&amp;nbsp; sourcetype=XXX&amp;nbsp;source=&amp;lt;sourcefilepath&amp;gt;/InformationtoSplunk*&amp;nbsp;&lt;BR /&gt;| dedup _raw&lt;BR /&gt;| fields source A B C D&lt;BR /&gt;| eval Time=source&lt;BR /&gt;| replace &amp;lt;sourcefilepath&amp;gt;/InformationtoSplunk* .csv WITH * in Time&lt;BR /&gt;| search Time!="*_*"&lt;BR /&gt;| eval Time_tmp=strftime(strptime(Time,"%Y%m%d"),"%Y%m")&lt;BR /&gt;| eval cur=strftime(now(),"%Y%m")&lt;BR /&gt;| where Time_tmp=cur&lt;BR /&gt;| eval Time=strptime(Time,"%Y%m%d")+1&lt;BR /&gt;| eval _time=Time&lt;BR /&gt;| eval jobs=B+C+D&lt;BR /&gt;| dedup jobs&lt;BR /&gt;| timechart span=1d count(jobs)&lt;BR /&gt;| eval Threshold=20000&lt;/P&gt;</description>
      <pubDate>Fri, 06 Aug 2021 04:11:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Count-for-last-30-days/m-p/562349#M195575</guid>
      <dc:creator>sachin9911</dc:creator>
      <dc:date>2021-08-06T04:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Count for last 30 days</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-Count-for-last-30-days/m-p/562371#M195583</link>
      <description>&lt;P&gt;I don't understand how this search gives you the results you have - can you share some raw events from you csv files?&lt;/P&gt;</description>
      <pubDate>Fri, 06 Aug 2021 07:09:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-Count-for-last-30-days/m-p/562371#M195583</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-08-06T07:09:17Z</dc:date>
    </item>
  </channel>
</rss>

