<?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: Can you help me with the following stats data query? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-the-following-stats-data-query/m-p/438795#M166936</link>
    <description>&lt;P&gt;@jip31,&lt;BR /&gt;
Try extracting the month(with year)and do the stats&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=windows sourcetype="wineventlog:system" SourceName="Disk" (EventCode=7 OR EventCode=11 OR EventCode=51 OR EventCode=52) Type="Critique" OR Type="Avertissement" OR Type="Erreur" | eval time = strftime(_time, "%m/%d/%Y %H:%M")  | dedup time | sort -time | eval mon=strftime(_time,"%Y-%m")|stats count by mon,type
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also, if you are using &lt;CODE&gt;dedup&lt;/CODE&gt; by time , then it deletes all duplicates just based on time and might affect your count &lt;/P&gt;</description>
    <pubDate>Fri, 19 Oct 2018 14:07:56 GMT</pubDate>
    <dc:creator>renjith_nair</dc:creator>
    <dc:date>2018-10-19T14:07:56Z</dc:date>
    <item>
      <title>Can you help me with the following stats data query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-the-following-stats-data-query/m-p/438794#M166935</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I use the request below&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=windows sourcetype="wineventlog:system" SourceName="Disk" (EventCode=7 OR EventCode=11 OR EventCode=51 OR EventCode=52) Type="Critique" OR Type="Avertissement" OR Type="Erreur" | eval time = strftime(_time, "%m/%d/%Y %H:%M")  | dedup time | sort -time | table time host Type EventCode Message
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I try to do a count by type and by time, but for time, i just need to take into account the month.&lt;/P&gt;

&lt;P&gt;I need the same things but by type, by host, and by month.&lt;/P&gt;

&lt;P&gt;could you help me please???&lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 13:48:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-the-following-stats-data-query/m-p/438794#M166935</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2018-10-19T13:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with the following stats data query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-the-following-stats-data-query/m-p/438795#M166936</link>
      <description>&lt;P&gt;@jip31,&lt;BR /&gt;
Try extracting the month(with year)and do the stats&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=windows sourcetype="wineventlog:system" SourceName="Disk" (EventCode=7 OR EventCode=11 OR EventCode=51 OR EventCode=52) Type="Critique" OR Type="Avertissement" OR Type="Erreur" | eval time = strftime(_time, "%m/%d/%Y %H:%M")  | dedup time | sort -time | eval mon=strftime(_time,"%Y-%m")|stats count by mon,type
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Also, if you are using &lt;CODE&gt;dedup&lt;/CODE&gt; by time , then it deletes all duplicates just based on time and might affect your count &lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 14:07:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-the-following-stats-data-query/m-p/438795#M166936</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-10-19T14:07:56Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with the following stats data query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-the-following-stats-data-query/m-p/438796#M166937</link>
      <description>&lt;P&gt;I'm not sure to understand your request, but I think it should look like someting like that : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=windows sourcetype="wineventlog:system" SourceName="Disk" (EventCode=7 OR EventCode=11 OR EventCode=51 OR EventCode=52) Type="Critique" OR Type="Avertissement" OR Type="Erreur" | timechart span=1month count by Type 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is that what you're looking for ? &lt;/P&gt;</description>
      <pubDate>Fri, 19 Oct 2018 14:10:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-the-following-stats-data-query/m-p/438796#M166937</guid>
      <dc:creator>3no</dc:creator>
      <dc:date>2018-10-19T14:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with the following stats data query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-the-following-stats-data-query/m-p/438797#M166938</link>
      <description>&lt;P&gt;Try this-&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=windows sourcetype="wineventlog:system" SourceName="Disk" (EventCode=7 OR EventCode=11 OR EventCode=51 OR EventCode=52) Type="Critique" OR Type="Avertissement" OR Type="Erreur" | bin span=1mon  _time| stats count values(Message) values(EventCode) by Type host _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 21 Oct 2018 20:29:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-the-following-stats-data-query/m-p/438797#M166938</guid>
      <dc:creator>Vijeta</dc:creator>
      <dc:date>2018-10-21T20:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with the following stats data query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-the-following-stats-data-query/m-p/438798#M166939</link>
      <description>&lt;P&gt;Hi i have no result with your query even if when i do index=windows sourcetype="wineventlog:system" SourceName="Disk" (EventCode=7 OR EventCode=11 OR EventCode=51 OR EventCode=52) Type="Critique" OR Type="Avertissement" OR Type="Erreur" | i have results&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 05:32:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-the-following-stats-data-query/m-p/438798#M166939</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2018-10-22T05:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with the following stats data query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-the-following-stats-data-query/m-p/438799#M166940</link>
      <description>&lt;P&gt;hi its close of want i want but there is mistake in the count&lt;BR /&gt;
on my computer i have :&lt;BR /&gt;
- october : 3 Avertissement with EventCode 51&lt;BR /&gt;
- September : 2 Avertissement with EventCode 51 and 4 Erreurs with EventCode 11&lt;BR /&gt;
So i have 9 events&lt;BR /&gt;
In your count i have for example 386 Avertissements with EventCode 51 in September!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 05:50:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-the-following-stats-data-query/m-p/438799#M166940</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2018-10-22T05:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with the following stats data query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-the-following-stats-data-query/m-p/438800#M166941</link>
      <description>&lt;P&gt;@jip31  If you want to do the count by Eventcode then try the below code &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=windows sourcetype="wineventlog:system" SourceName="Disk" (EventCode=7 OR EventCode=11 OR EventCode=51 OR EventCode=52) Type="Critique" OR Type="Avertissement" OR Type="Erreur" | bin span=1mon  _time| stats count values(Message)  by EventCode Type host _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Oct 2018 05:54:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-the-following-stats-data-query/m-p/438800#M166941</guid>
      <dc:creator>Vijeta</dc:creator>
      <dc:date>2018-10-22T05:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with the following stats data query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-the-following-stats-data-query/m-p/438801#M166942</link>
      <description>&lt;P&gt;Yes but my main problem is the count which is false&lt;BR /&gt;
when i look my events i have a lot of events which the same time&lt;BR /&gt;
for example : 10/04/2018 05:44:47 AM&lt;BR /&gt;
due to this piece of code bin span=1mon  _time i cant do a dedup time&lt;BR /&gt;
have you an idea please??&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 07:21:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-the-following-stats-data-query/m-p/438801#M166942</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2018-10-22T07:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with the following stats data query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-the-following-stats-data-query/m-p/438802#M166943</link>
      <description>&lt;P&gt;@jip31,&lt;BR /&gt;
are you getting results after &lt;CODE&gt;eval mon=strftime(_time,"%Y-%m")&lt;/CODE&gt; and also change  &lt;CODE&gt;type&lt;/CODE&gt;  to &lt;CODE&gt;Type&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 11:05:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-the-following-stats-data-query/m-p/438802#M166943</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-10-22T11:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with the following stats data query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-the-following-stats-data-query/m-p/438803#M166944</link>
      <description>&lt;P&gt;yes it was due to Type renjith, many thanks&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 11:49:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-the-following-stats-data-query/m-p/438803#M166944</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2018-10-22T11:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me with the following stats data query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-the-following-stats-data-query/m-p/438804#M166945</link>
      <description>&lt;P&gt;To remove duplicates on time and count by eventcode:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=windows sourcetype="wineventlog:system" SourceName="Disk" (EventCode=7 OR EventCode=11 OR EventCode=51 OR EventCode=52) Type="Critique" OR Type="Avertissement" OR Type="Erreur" | dedup _time | bin span=1mon  _time| stats count values(Message)  by EventCode Type host _time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If the field date_month is available, you could use that instead of _time, if you wished.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Oct 2018 12:18:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-with-the-following-stats-data-query/m-p/438804#M166945</guid>
      <dc:creator>landen99</dc:creator>
      <dc:date>2018-10-22T12:18:04Z</dc:date>
    </item>
  </channel>
</rss>

