<?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 Quick and Dirty Keyword Search in Monitoring Splunk</title>
    <link>https://community.splunk.com/t5/Monitoring-Splunk/Quick-and-Dirty-Keyword-Search/m-p/307335#M2862</link>
    <description>&lt;P&gt;I know that this can be done with a lookup, but I was wondering if there was a quick and dirty way to search through web traffic for like three keywords. For example:&lt;/P&gt;

&lt;P&gt;bad1&lt;BR /&gt;
bad2&lt;BR /&gt;
bad3&lt;/P&gt;

&lt;P&gt;I would like to break the keywords into counts. Normally you would do count by fieldName. &lt;/P&gt;

&lt;P&gt;Is there a way to do this in SPL, and not have to create a lookup table for each time you go hunting for something? This would probably be used once or twice per set of keywords - that is why I am not trying to do a saved lookup. &lt;/P&gt;</description>
    <pubDate>Fri, 31 Mar 2017 15:52:30 GMT</pubDate>
    <dc:creator>stakor</dc:creator>
    <dc:date>2017-03-31T15:52:30Z</dc:date>
    <item>
      <title>Quick and Dirty Keyword Search</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Quick-and-Dirty-Keyword-Search/m-p/307335#M2862</link>
      <description>&lt;P&gt;I know that this can be done with a lookup, but I was wondering if there was a quick and dirty way to search through web traffic for like three keywords. For example:&lt;/P&gt;

&lt;P&gt;bad1&lt;BR /&gt;
bad2&lt;BR /&gt;
bad3&lt;/P&gt;

&lt;P&gt;I would like to break the keywords into counts. Normally you would do count by fieldName. &lt;/P&gt;

&lt;P&gt;Is there a way to do this in SPL, and not have to create a lookup table for each time you go hunting for something? This would probably be used once or twice per set of keywords - that is why I am not trying to do a saved lookup. &lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2017 15:52:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Quick-and-Dirty-Keyword-Search/m-p/307335#M2862</guid>
      <dc:creator>stakor</dc:creator>
      <dc:date>2017-03-31T15:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: Quick and Dirty Keyword Search</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Quick-and-Dirty-Keyword-Search/m-p/307336#M2863</link>
      <description>&lt;P&gt;Try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search bad1 OR bad2 OR bad3 
| eval keyword=case(searchmatch("bad1"),"bad1",searchmatch("bad2"),"bad2",searchmatch("bad3"),"bad3")
| stats count by keyword
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search bad1 OR bad2 OR bad3 
| rex max_match=0 "(?&amp;lt;keyword&amp;gt;(bad1|bad2|bad3)"
| stats count by keyword
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 31 Mar 2017 16:29:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Quick-and-Dirty-Keyword-Search/m-p/307336#M2863</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-03-31T16:29:32Z</dc:date>
    </item>
  </channel>
</rss>

