<?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 Command Help in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/EVAL-Command-Help/m-p/532203#M150344</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;After trying the query, I get and error message stating:&lt;/P&gt;&lt;P&gt;"&lt;SPAN&gt;Error in 'eval' command: The arguments to the 'like' function are invalid."&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="job-status-container"&gt;&lt;DIV class="shared-jobstatus"&gt;&lt;DIV class="alert alert-error"&gt;-Marco&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 07 Dec 2020 15:25:46 GMT</pubDate>
    <dc:creator>Marco</dc:creator>
    <dc:date>2020-12-07T15:25:46Z</dc:date>
    <item>
      <title>EVAL Command Help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/EVAL-Command-Help/m-p/532085#M150310</link>
      <description>&lt;P&gt;Hello Splunkers,&lt;/P&gt;&lt;P&gt;I am trying to write is a condition that says if command starts with "CHA" or "INS" add one.&lt;/P&gt;&lt;P&gt;The Query:&amp;nbsp;&lt;/P&gt;&lt;P&gt;host=*| &lt;FONT color="#0000FF"&gt;eval&lt;/FONT&gt; AUDIT=&lt;FONT color="#FF00FF"&gt;if&lt;/FONT&gt;(&lt;FONT color="#FF00FF"&gt;like&lt;/FONT&gt;(COMMAND,"CHA % AUDIT%", "INS % AUDIT%"),1,0)| &lt;FONT color="#0000FF"&gt;stats&lt;/FONT&gt; &lt;FONT color="#FF00FF"&gt;sum&lt;/FONT&gt;(AUDIT)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not combining the conditions get me a working query EX:&amp;nbsp;&lt;/P&gt;&lt;P&gt;host=* | &lt;FONT color="#0000FF"&gt;eval&lt;/FONT&gt; AUDIT=&lt;FONT color="#FF00FF"&gt;if&lt;/FONT&gt;(&lt;FONT color="#FF00FF"&gt;like&lt;/FONT&gt;(COMMAND,"CHA % AUDIT%"),1,0)|&lt;FONT color="#0000FF"&gt;stats&lt;/FONT&gt; &lt;FONT color="#FF00FF"&gt;sum&lt;/FONT&gt;(AUDIT)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way I can get the query working?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Dec 2020 23:33:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/EVAL-Command-Help/m-p/532085#M150310</guid>
      <dc:creator>Marco</dc:creator>
      <dc:date>2020-12-04T23:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: EVAL Command Help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/EVAL-Command-Help/m-p/532087#M150311</link>
      <description>&lt;P&gt;The solution is in the question.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;I am trying to write is a condition that says if command starts with "CHA" &lt;FONT color="#FF0000"&gt;or&lt;/FONT&gt; "INS" add one.&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;host=*
| eval AUDIT=if(like(COMMAND,"CHA % AUDIT%") OR like(COMMAND,"INS % AUDIT%"),1,0)
| stats sum(AUDIT)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2020 15:27:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/EVAL-Command-Help/m-p/532087#M150311</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-12-07T15:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: EVAL Command Help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/EVAL-Command-Help/m-p/532203#M150344</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;After trying the query, I get and error message stating:&lt;/P&gt;&lt;P&gt;"&lt;SPAN&gt;Error in 'eval' command: The arguments to the 'like' function are invalid."&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV class="job-status-container"&gt;&lt;DIV class="shared-jobstatus"&gt;&lt;DIV class="alert alert-error"&gt;-Marco&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 07 Dec 2020 15:25:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/EVAL-Command-Help/m-p/532203#M150344</guid>
      <dc:creator>Marco</dc:creator>
      <dc:date>2020-12-07T15:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: EVAL Command Help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/EVAL-Command-Help/m-p/532204#M150345</link>
      <description>&lt;P&gt;I've fixed my answer.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2020 15:27:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/EVAL-Command-Help/m-p/532204#M150345</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-12-07T15:27:46Z</dc:date>
    </item>
    <item>
      <title>Re: EVAL Command Help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/EVAL-Command-Help/m-p/532206#M150346</link>
      <description>&lt;P&gt;Thank you so much,&lt;/P&gt;&lt;P&gt;I've been trying to figure that out for hours.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":folded_hands:"&gt;🙏&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2020 15:38:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/EVAL-Command-Help/m-p/532206#M150346</guid>
      <dc:creator>Marco</dc:creator>
      <dc:date>2020-12-07T15:38:38Z</dc:date>
    </item>
  </channel>
</rss>

