<?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 How to write a stats count search for events based on common (but variable) names? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-stats-count-search-for-events-based-on-common-but/m-p/192106#M55254</link>
    <description>&lt;P&gt;I have a log file that lists which tool created the alert.  I would like to count alerts by tool name, but I want to combine certain tool counts based on commonalities that I specify.&lt;/P&gt;

&lt;P&gt;For example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=logs | stats count by Tools
McAfee Basic     12
Extreme McAfee   34
Plat McAfee Plus 6
Xerox IDS Base   1
Stumble IDS Plus 8
Microsoft X IDS  40
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would prefer to count based on tools having the word "McAfee" or "IDS" in them (so that they're grouped)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=logs | some UNKNOWN QUERY
McAfee 52
IDS 49
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 03 Nov 2014 21:19:07 GMT</pubDate>
    <dc:creator>DEAD_BEEF</dc:creator>
    <dc:date>2014-11-03T21:19:07Z</dc:date>
    <item>
      <title>How to write a stats count search for events based on common (but variable) names?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-stats-count-search-for-events-based-on-common-but/m-p/192106#M55254</link>
      <description>&lt;P&gt;I have a log file that lists which tool created the alert.  I would like to count alerts by tool name, but I want to combine certain tool counts based on commonalities that I specify.&lt;/P&gt;

&lt;P&gt;For example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=logs | stats count by Tools
McAfee Basic     12
Extreme McAfee   34
Plat McAfee Plus 6
Xerox IDS Base   1
Stumble IDS Plus 8
Microsoft X IDS  40
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I would prefer to count based on tools having the word "McAfee" or "IDS" in them (so that they're grouped)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=logs | some UNKNOWN QUERY
McAfee 52
IDS 49
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 03 Nov 2014 21:19:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-stats-count-search-for-events-based-on-common-but/m-p/192106#M55254</guid>
      <dc:creator>DEAD_BEEF</dc:creator>
      <dc:date>2014-11-03T21:19:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a stats count search for events based on common (but variable) names?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-stats-count-search-for-events-based-on-common-but/m-p/192107#M55255</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=logs | stats count(eval(searchmatch("McAfee"))) as McAfee count(eval(searchmatch("IDS"))) as IDS
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 03 Nov 2014 21:38:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-stats-count-search-for-events-based-on-common-but/m-p/192107#M55255</guid>
      <dc:creator>wpreston</dc:creator>
      <dc:date>2014-11-03T21:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a stats count search for events based on common (but variable) names?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-stats-count-search-for-events-based-on-common-but/m-p/192108#M55256</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=logs | stats count(eval(match(Tools,"McAfee"))) as "McAfee" count(eval(match(Tools,"IDS"))) as IDS  
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 03 Nov 2014 21:50:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-stats-count-search-for-events-based-on-common-but/m-p/192108#M55256</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-11-03T21:50:41Z</dc:date>
    </item>
  </channel>
</rss>

