<?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: Total occurrences within a column in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Total-occurrences-within-a-column/m-p/350558#M103779</link>
    <description>&lt;P&gt;hey Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=wineventlog sourcetype=WinEventLog:System EventCode=19 
| eval Date=strftime(_time, "%Y/%m/%d") 
| rex "\WKB(?&amp;lt;KB&amp;gt;.\d+)\W" 
| eval successRatio=mvindex(split(Keywords,","),-1) 
| stats count(eval(successRatio="Success")) as "Success_Count" count(eval(successRatio="Failure")) as "Failure_Count" by Date , host, package_title, KB , body 
| sort host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;let me know if this helps!&lt;/P&gt;</description>
    <pubDate>Wed, 31 Jan 2018 06:21:13 GMT</pubDate>
    <dc:creator>mayurr98</dc:creator>
    <dc:date>2018-01-31T06:21:13Z</dc:date>
    <item>
      <title>Total occurrences within a column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Total-occurrences-within-a-column/m-p/350556#M103777</link>
      <description>&lt;P&gt;I am pulling Windows event logs for software updates. There's a column for successRatio that is either Success or Failure as the result. I would like to append my event log search query to give me a total number of Success and total number of Failure. Bonus points if we can make it a numerical value on a dashboard. Here is my initial search query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=wineventlog sourcetype=WinEventLog:System EventCode=19  | eval Date=strftime(_time, "%Y/%m/%d") | rex "\WKB(?&amp;lt;KB&amp;gt;.\d+)\W" | eval successRatio=mvindex(split(Keywords,","),-1) | stats count by Date , host, package_title, KB , body , successRatio| sort host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This works great, but like I said, I'd like to have a total count of success and failures available in a report and a dashboard.&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2018 01:44:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Total-occurrences-within-a-column/m-p/350556#M103777</guid>
      <dc:creator>dmarcantonionw</dc:creator>
      <dc:date>2018-01-31T01:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: Total occurrences within a column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Total-occurrences-within-a-column/m-p/350557#M103778</link>
      <description>&lt;P&gt;Hello there,&lt;/P&gt;

&lt;P&gt;please try out this search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  index=wineventlog sourcetype=WinEventLog:System EventCode=19 
    | eval Date=strftime(_time, "%Y/%m/%d") 
    | rex "\WKB(?&amp;lt;KB&amp;gt;.\d+)\W" 
    | rex field=Keywords "\w+,\s+(?&amp;lt;status&amp;gt;\S+)"
    | stats count(eval(status="Success")) as succeeded count(eval(status="Failure")) as failed
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;from here you can take it however you would like&lt;/P&gt;

&lt;P&gt;hope it helps&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2018 02:43:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Total-occurrences-within-a-column/m-p/350557#M103778</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2018-01-31T02:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: Total occurrences within a column</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Total-occurrences-within-a-column/m-p/350558#M103779</link>
      <description>&lt;P&gt;hey Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=wineventlog sourcetype=WinEventLog:System EventCode=19 
| eval Date=strftime(_time, "%Y/%m/%d") 
| rex "\WKB(?&amp;lt;KB&amp;gt;.\d+)\W" 
| eval successRatio=mvindex(split(Keywords,","),-1) 
| stats count(eval(successRatio="Success")) as "Success_Count" count(eval(successRatio="Failure")) as "Failure_Count" by Date , host, package_title, KB , body 
| sort host
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;let me know if this helps!&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jan 2018 06:21:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Total-occurrences-within-a-column/m-p/350558#M103779</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-01-31T06:21:13Z</dc:date>
    </item>
  </channel>
</rss>

