<?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: eval expression usage in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/eval-expression-usage/m-p/16466#M2203</link>
    <description>&lt;P&gt;OK, &lt;BR /&gt;
I hang my head in shame....&lt;/P&gt;

&lt;P&gt;I thought I had tried it, but when I followed your recommendation it worked.&lt;/P&gt;

&lt;P&gt;I guess I got confused with all the things I tried.&lt;/P&gt;

&lt;P&gt;Than you for the help.&lt;/P&gt;</description>
    <pubDate>Wed, 30 Jun 2010 01:20:22 GMT</pubDate>
    <dc:creator>bbear</dc:creator>
    <dc:date>2010-06-30T01:20:22Z</dc:date>
    <item>
      <title>eval expression usage</title>
      <link>https://community.splunk.com/t5/Splunk-Search/eval-expression-usage/m-p/16464#M2201</link>
      <description>&lt;P&gt;Greetings.&lt;/P&gt;

&lt;P&gt;I am trying to use an expression in the search string that will not display certain IP addresses. I have used the LIKE "172.%" to good use to display all IP addresses beginning with 172.x.&lt;/P&gt;

&lt;P&gt;However, I would like to exclude the 172.x, 10.x and 192.168.X from being displayed.&lt;/P&gt;

&lt;P&gt;I have been using a search string like the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/logtest" drop |stats count by srchost |where (srchost LIKE "10.%")| where count &amp;gt; 2 | sort by -count | head 10
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Notice in the string above the (srchost LIKE"10.%")&lt;/P&gt;

&lt;P&gt;Is there a way of creating something that will exclude 10.%? Something on the order of NOT LIKE?&lt;/P&gt;

&lt;P&gt;If anyone has the answer I would appreciate it.
Thanks in Advance.&lt;/P&gt;

&lt;P&gt;bbear&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2010 01:03:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/eval-expression-usage/m-p/16464#M2201</guid>
      <dc:creator>bbear</dc:creator>
      <dc:date>2010-06-30T01:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: eval expression usage</title>
      <link>https://community.splunk.com/t5/Splunk-Search/eval-expression-usage/m-p/16465#M2202</link>
      <description>&lt;P&gt;Have you tried:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | where NOT (srchost LIKE "10.%") | ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Jun 2010 01:10:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/eval-expression-usage/m-p/16465#M2202</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2010-06-30T01:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: eval expression usage</title>
      <link>https://community.splunk.com/t5/Splunk-Search/eval-expression-usage/m-p/16466#M2203</link>
      <description>&lt;P&gt;OK, &lt;BR /&gt;
I hang my head in shame....&lt;/P&gt;

&lt;P&gt;I thought I had tried it, but when I followed your recommendation it worked.&lt;/P&gt;

&lt;P&gt;I guess I got confused with all the things I tried.&lt;/P&gt;

&lt;P&gt;Than you for the help.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2010 01:20:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/eval-expression-usage/m-p/16466#M2203</guid>
      <dc:creator>bbear</dc:creator>
      <dc:date>2010-06-30T01:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: eval expression usage</title>
      <link>https://community.splunk.com/t5/Splunk-Search/eval-expression-usage/m-p/16467#M2204</link>
      <description>&lt;P&gt;No problem.  I've been there too.  &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;  Sometimes you just need another set of eyes.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jun 2010 01:30:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/eval-expression-usage/m-p/16467#M2204</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2010-06-30T01:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: eval expression usage</title>
      <link>https://community.splunk.com/t5/Splunk-Search/eval-expression-usage/m-p/16468#M2205</link>
      <description>&lt;P&gt;I would recommend use of the &lt;CODE&gt;cidrmatch()&lt;/CODE&gt; eval function: &lt;A href="http://www.splunk.com/base/Documentation/latest/SearchReference/CommonEvalFunctions" rel="nofollow"&gt;http://www.splunk.com/base/Documentation/latest/SearchReference/CommonEvalFunctions&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;but in your case, what I'd &lt;EM&gt;really&lt;/EM&gt; recommend is doing your search as:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/logtest" drop srchost!=10.0.0.0/24 | stats count by srchost | where count &amp;gt; 2 | sort by -count | head 10
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Jun 2010 01:47:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/eval-expression-usage/m-p/16468#M2205</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2010-06-30T01:47:38Z</dc:date>
    </item>
  </channel>
</rss>

