<?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: Events contain several occurrences of search string in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Events-contain-several-occurrences-of-search-string/m-p/165734#M47122</link>
    <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host="host.test.com" AND "Sent mail to" | rex field=_raw max_match=0 "(?P&amp;lt;SentMail&amp;gt;Sent mail to*)" | eval count=mvcount(SentMail) | stats sum(count) as Total
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 15 May 2014 15:27:53 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2014-05-15T15:27:53Z</dc:date>
    <item>
      <title>Events contain several occurrences of search string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Events-contain-several-occurrences-of-search-string/m-p/165731#M47119</link>
      <description>&lt;P&gt;I'd like to count the occurrences of a certain string for a specific server. Right now I'm using:&lt;/P&gt;

&lt;P&gt;host="host.test.com" AND "Sent mail to" | stats count as Total&lt;/P&gt;

&lt;P&gt;This returns the number of Events found. However, in some cases one event contains this string more than once and I'd like to count those as well.&lt;/P&gt;

&lt;P&gt;How do I count the occurrences of that String rather than the number of events this String occurs in?&lt;/P&gt;</description>
      <pubDate>Thu, 15 May 2014 15:01:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Events-contain-several-occurrences-of-search-string/m-p/165731#M47119</guid>
      <dc:creator>smiehe</dc:creator>
      <dc:date>2014-05-15T15:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Events contain several occurrences of search string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Events-contain-several-occurrences-of-search-string/m-p/165732#M47120</link>
      <description>&lt;P&gt;Is there some kind of delimiter? because if there is, then you want to make a multivalue field and then create a field that holds the number of values... then you can sum on that field.  If you show a few lines of the log, I can be more specific...&lt;/P&gt;</description>
      <pubDate>Thu, 15 May 2014 15:19:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Events-contain-several-occurrences-of-search-string/m-p/165732#M47120</guid>
      <dc:creator>rsennett_splunk</dc:creator>
      <dc:date>2014-05-15T15:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: Events contain several occurrences of search string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Events-contain-several-occurrences-of-search-string/m-p/165733#M47121</link>
      <description>&lt;P&gt;No, the format is as follows within a single event:&lt;/P&gt;

&lt;P&gt;Sent mail to &lt;A href="mailto:user1@mail.com" target="_blank"&gt;user1@mail.com&lt;/A&gt; (205ms)&lt;BR /&gt;
  Rendered user_mailer/email.html.erb (22.4ms)&lt;BR /&gt;
Sent mail to &lt;A href="mailto:user2@mail.com" target="_blank"&gt;user2@mail.com&lt;/A&gt; (196ms)&lt;BR /&gt;
  Rendered user_mailer/email.html.erb (22.4ms)&lt;/P&gt;

&lt;P&gt;In this case I'd need to count this as two occurrences&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:37:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Events-contain-several-occurrences-of-search-string/m-p/165733#M47121</guid>
      <dc:creator>smiehe</dc:creator>
      <dc:date>2020-09-28T16:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: Events contain several occurrences of search string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Events-contain-several-occurrences-of-search-string/m-p/165734#M47122</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host="host.test.com" AND "Sent mail to" | rex field=_raw max_match=0 "(?P&amp;lt;SentMail&amp;gt;Sent mail to*)" | eval count=mvcount(SentMail) | stats sum(count) as Total
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 May 2014 15:27:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Events-contain-several-occurrences-of-search-string/m-p/165734#M47122</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-05-15T15:27:53Z</dc:date>
    </item>
    <item>
      <title>Re: Events contain several occurrences of search string</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Events-contain-several-occurrences-of-search-string/m-p/165735#M47123</link>
      <description>&lt;P&gt;hey somesoni,&lt;/P&gt;

&lt;P&gt;This query is working fine , can you tell me any other alternative to find events contain several occurrences string. &lt;/P&gt;</description>
      <pubDate>Fri, 25 Mar 2016 11:43:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Events-contain-several-occurrences-of-search-string/m-p/165735#M47123</guid>
      <dc:creator>erritesh17</dc:creator>
      <dc:date>2016-03-25T11:43:11Z</dc:date>
    </item>
  </channel>
</rss>

