<?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 Splunk If else and severity search query in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Splunk-If-else-and-severity-search-query/m-p/518563#M145839</link>
    <description>&lt;P&gt;I am trying to write splunk search where I have 2 conditions and my query returns the results based on that&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;for example if condition1 matches create a new field (SEVERITY)=SEV2&lt;BR /&gt;if condition 2 matches SEVERITY=SEV2&amp;nbsp;&lt;BR /&gt;else SEVERITY=SEV3&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;How can I achieve this ...In my search string I am using couple of fields to filter the data putting that as SEV2 criteria ...I am able to filter it but and get the results for both the conditions but I am stuck where I cannot call everything else as SEV3&lt;/P&gt;</description>
    <pubDate>Tue, 08 Sep 2020 21:13:42 GMT</pubDate>
    <dc:creator>puneetkharband1</dc:creator>
    <dc:date>2020-09-08T21:13:42Z</dc:date>
    <item>
      <title>Splunk If else and severity search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-If-else-and-severity-search-query/m-p/518563#M145839</link>
      <description>&lt;P&gt;I am trying to write splunk search where I have 2 conditions and my query returns the results based on that&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;for example if condition1 matches create a new field (SEVERITY)=SEV2&lt;BR /&gt;if condition 2 matches SEVERITY=SEV2&amp;nbsp;&lt;BR /&gt;else SEVERITY=SEV3&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;How can I achieve this ...In my search string I am using couple of fields to filter the data putting that as SEV2 criteria ...I am able to filter it but and get the results for both the conditions but I am stuck where I cannot call everything else as SEV3&lt;/P&gt;</description>
      <pubDate>Tue, 08 Sep 2020 21:13:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-If-else-and-severity-search-query/m-p/518563#M145839</guid>
      <dc:creator>puneetkharband1</dc:creator>
      <dc:date>2020-09-08T21:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk If else and severity search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-If-else-and-severity-search-query/m-p/518566#M145860</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval SEVERITY=if(condition1,"SEV2",if(condition2,"SEV2","SEV3"))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Sep 2020 21:37:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-If-else-and-severity-search-query/m-p/518566#M145860</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-09-08T21:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk If else and severity search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-If-else-and-severity-search-query/m-p/518569#M145888</link>
      <description>&lt;P&gt;not sure you understood my question ...thanks for looking into that ....but how to define the condition in the search thats where I am getting confused&amp;nbsp;&lt;/P&gt;&lt;P&gt;Condition 1&lt;BR /&gt;Index=abc sourcetype=QWE&lt;BR /&gt;action=XYZ&amp;nbsp;&lt;BR /&gt;OR&lt;BR /&gt;condition2&lt;BR /&gt;NOT (test=blablaand action=xyz)&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Sep 2020 22:11:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-If-else-and-severity-search-query/m-p/518569#M145888</guid>
      <dc:creator>puneetkharband1</dc:creator>
      <dc:date>2020-09-08T22:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk If else and severity search query</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-If-else-and-severity-search-query/m-p/518577#M145897</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval SEVERITY=if(index=abc AND sourcetype=QWE AND action=XYZ, "SEV2", if(NOT (test=blabla AND action=xyz), "SEV2", "SEV3"))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you give an example of your current queries for a little context to what you are asking for?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Sep 2020 22:59:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-If-else-and-severity-search-query/m-p/518577#M145897</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2020-09-08T22:59:25Z</dc:date>
    </item>
  </channel>
</rss>

