<?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: Count Occurrence of string from raw log in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Count-Occurrence-of-string-from-raw-log/m-p/143952#M40037</link>
    <description>&lt;P&gt;You can just use the string "MediaFailed" as a part of your search, something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=&amp;lt;whatever&amp;gt; "MediaFailed" | stats count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That will search it matching the case.&lt;/P&gt;</description>
    <pubDate>Fri, 05 Dec 2014 16:31:49 GMT</pubDate>
    <dc:creator>cpetterborg</dc:creator>
    <dc:date>2014-12-05T16:31:49Z</dc:date>
    <item>
      <title>Count Occurrence of string from raw log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-Occurrence-of-string-from-raw-log/m-p/143951#M40036</link>
      <description>&lt;P&gt;I am trying to count occurrences of events from raw logs. Basically, if the log contains the string "MediaFailed", then count it.  The difficulty is this string is not part of a key-value pair so I can't do an equality statement. I'm just looking for its existence within the entire log. I have tried the following, unsuccessfully:&lt;/P&gt;

&lt;P&gt;|  eval failures=case(match(_raw,"MediaFailed"),uuid)&lt;/P&gt;

&lt;P&gt;Any help is appreciated!&lt;/P&gt;</description>
      <pubDate>Fri, 05 Dec 2014 16:23:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-Occurrence-of-string-from-raw-log/m-p/143951#M40036</guid>
      <dc:creator>andreacorrie</dc:creator>
      <dc:date>2014-12-05T16:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: Count Occurrence of string from raw log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-Occurrence-of-string-from-raw-log/m-p/143952#M40037</link>
      <description>&lt;P&gt;You can just use the string "MediaFailed" as a part of your search, something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source=&amp;lt;whatever&amp;gt; "MediaFailed" | stats count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That will search it matching the case.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Dec 2014 16:31:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-Occurrence-of-string-from-raw-log/m-p/143952#M40037</guid>
      <dc:creator>cpetterborg</dc:creator>
      <dc:date>2014-12-05T16:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: Count Occurrence of string from raw log</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Count-Occurrence-of-string-from-raw-log/m-p/143953#M40038</link>
      <description>&lt;P&gt;Something like this would work?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval failures=if(match(_raw,"*MediaFailed*"),1,0)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Dec 2014 16:35:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Count-Occurrence-of-string-from-raw-log/m-p/143953#M40038</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-12-05T16:35:18Z</dc:date>
    </item>
  </channel>
</rss>

