<?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: IF with some conditionals in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/IF-with-some-conditionals/m-p/311989#M93462</link>
    <description>&lt;P&gt;My mistake it was that i forgotten the "" with "LOGIN".&lt;BR /&gt;
Please cancel my question.&lt;/P&gt;</description>
    <pubDate>Mon, 26 Feb 2018 00:00:34 GMT</pubDate>
    <dc:creator>jnahuelperez35</dc:creator>
    <dc:date>2018-02-26T00:00:34Z</dc:date>
    <item>
      <title>IF with some conditionals</title>
      <link>https://community.splunk.com/t5/Splunk-Search/IF-with-some-conditionals/m-p/311988#M93461</link>
      <description>&lt;P&gt;I guys! i would like to count the fail and success logons on my SFTP. The events are&lt;BR /&gt;
Successfull Logins from different accounts:&lt;BR /&gt;
[40] Sat 24Feb18 01:53:49 - (1809219) HTTP_LOGIN: user: MYUSER; domain: cname.mydomain.com&lt;BR /&gt;
[31] Sun 25Feb18 20:05:03 - (1836845) SSH2_MSG_USERAUTH_SUCCESS: successful login&lt;/P&gt;

&lt;P&gt;Failed logins from different accounts:&lt;BR /&gt;
[31] Sun 25Feb18 20:05:03 - (1836845) SSH2_MSG_USERAUTH_FAILURE: login failed&lt;BR /&gt;
[41] Sat 24Feb18 01:53:38 - (1809216) HTTP_OKAY (200): SESS_FAIL&lt;/P&gt;

&lt;P&gt;So i made this search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    index="sftp" SSHCommand="MSG_USERAUTH_SUCCESS" OR http_command=LOGIN OR SSHCommand="MSG_USERAUTH_FAILURE" OR Event_Message="*SESS_FAIL*"  Event_Message="HTTP_OKAY (200): SESS_FAIL" 
| eval type=IF(SSHCommand="MSG_USERAUTH_SUCCESS" OR (Event_Message="HTTP_LOGIN: user:*"),"SUCCESS", IF(SSHCommand="MSG_USERAUTH_FAILURE" OR Event_Message="HTTP_OKAY (200): SESS_FAIL","FAIL","OTHER"))  
| stats  list(Event_Message) by type
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But it returns "other" values that star with:&lt;BR /&gt;
HTTP_LOGIN: user: MYUSER; domain: cname.mydomain.com&lt;/P&gt;

&lt;P&gt;any ideas?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:11:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/IF-with-some-conditionals/m-p/311988#M93461</guid>
      <dc:creator>jnahuelperez35</dc:creator>
      <dc:date>2020-09-29T18:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: IF with some conditionals</title>
      <link>https://community.splunk.com/t5/Splunk-Search/IF-with-some-conditionals/m-p/311989#M93462</link>
      <description>&lt;P&gt;My mistake it was that i forgotten the "" with "LOGIN".&lt;BR /&gt;
Please cancel my question.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2018 00:00:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/IF-with-some-conditionals/m-p/311989#M93462</guid>
      <dc:creator>jnahuelperez35</dc:creator>
      <dc:date>2018-02-26T00:00:34Z</dc:date>
    </item>
  </channel>
</rss>

