<?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 with multiple values in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Eval-with-multiple-values/m-p/254935#M76348</link>
    <description>&lt;P&gt;Excellent idea!&lt;/P&gt;</description>
    <pubDate>Fri, 14 Oct 2016 16:59:59 GMT</pubDate>
    <dc:creator>jwalzerpitt</dc:creator>
    <dc:date>2016-10-14T16:59:59Z</dc:date>
    <item>
      <title>Eval with multiple values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-with-multiple-values/m-p/254929#M76342</link>
      <description>&lt;P&gt;I have three event types:&lt;/P&gt;

&lt;P&gt;eventtype="windows_login_failed"&lt;BR /&gt;
eventtype="duo_login_failed"&lt;BR /&gt;
eventtype="sremote_login_failed"&lt;/P&gt;

&lt;P&gt;I am trying to run a search in which I rename the event types to a common name:&lt;/P&gt;

&lt;P&gt;Windows = eventtype="windows_login_failed"&lt;BR /&gt;
DUO = eventtype="duo_login_failed"&lt;BR /&gt;
Sremote = eventtype="sremote_login_failed"&lt;/P&gt;

&lt;P&gt;I run the following search, but I keep getting an error message stating, 'Error in 'eval' command: The expression is malformed. Expected ).'&lt;/P&gt;

&lt;P&gt;eventtype="windows_login_failed" OR eventtype="duo_login_failed" OR eventtype="sremote_login_failed" [| inputlookup xxx_xxx ] OR [| inputlookup yyy_yyy] | eval Source = (eventtype == windows_login_failed, "Windows"), (eventtype == sremote_login_failed, "SRemote"),  (eventtype == duo_login_failed, "DUO") | stats count by myuser,Source| sort -count&lt;/P&gt;

&lt;P&gt;Any help would be greatly appreciated&lt;/P&gt;

&lt;P&gt;Thx&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:25:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-with-multiple-values/m-p/254929#M76342</guid>
      <dc:creator>jwalzerpitt</dc:creator>
      <dc:date>2020-09-29T11:25:55Z</dc:date>
    </item>
    <item>
      <title>Re: Eval with multiple values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-with-multiple-values/m-p/254930#M76343</link>
      <description>&lt;P&gt;you'll need to make a case statement. try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...| eval Source = case(eventtype == "windows_login_failed", "Windows", eventtype == "sremote_login_failed", "SRemote", eventtype == "duo_login_failed", "DUO")| ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 14 Oct 2016 16:11:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-with-multiple-values/m-p/254930#M76343</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2016-10-14T16:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: Eval with multiple values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-with-multiple-values/m-p/254931#M76344</link>
      <description>&lt;P&gt;Please check this one - &lt;BR /&gt;
eval Source=case(eventtype==windows_login_failed, "Windows", eventtype==sremote_login_failed, "SRemote", eventtype==duo_login_failed, "DUO")&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eventtype="windows_login_failed" OR eventtype="duo_login_failed" OR eventtype="sremote_login_failed" [| inputlookup xxx_xxx ] OR [| inputlookup yyy_yyy] | eval Source=case(eventtype==windows_login_failed, "Windows", eventtype==sremote_login_failed, "SRemote", eventtype==duo_login_failed, "DUO") | stats count by myuser,Source| sort -count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:23:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-with-multiple-values/m-p/254931#M76344</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2020-09-29T11:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: Eval with multiple values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-with-multiple-values/m-p/254932#M76345</link>
      <description>&lt;P&gt;Thx - that worked great. Appreciate the reply.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2016 16:32:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-with-multiple-values/m-p/254932#M76345</guid>
      <dc:creator>jwalzerpitt</dc:creator>
      <dc:date>2016-10-14T16:32:02Z</dc:date>
    </item>
    <item>
      <title>Re: Eval with multiple values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-with-multiple-values/m-p/254933#M76346</link>
      <description>&lt;P&gt;Thx - that worked great. Appreciate the reply.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2016 16:32:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-with-multiple-values/m-p/254933#M76346</guid>
      <dc:creator>jwalzerpitt</dc:creator>
      <dc:date>2016-10-14T16:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: Eval with multiple values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-with-multiple-values/m-p/254934#M76347</link>
      <description>&lt;P&gt;Why you don't use a tag (e.g. Login_failed) assigned to th Three eventypes?&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe &lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2016 16:48:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-with-multiple-values/m-p/254934#M76347</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2016-10-14T16:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: Eval with multiple values</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Eval-with-multiple-values/m-p/254935#M76348</link>
      <description>&lt;P&gt;Excellent idea!&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2016 16:59:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Eval-with-multiple-values/m-p/254935#M76348</guid>
      <dc:creator>jwalzerpitt</dc:creator>
      <dc:date>2016-10-14T16:59:59Z</dc:date>
    </item>
  </channel>
</rss>

