<?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 search query filter in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/search-query-filter/m-p/339378#M159680</link>
    <description>&lt;P&gt;I have a simple search query to look for vpn alerts&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=nm host = inyod1-jvpn1a-dmz8-lo0 syslog_message="*karachi*" KMD_PM_SA_ESTABLISHED OR "IKE negotiation failed with error"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, I want to make splunk return results of &lt;CODE&gt;KMD_PM_SA_ESTABLISHED&lt;/CODE&gt; only when the &lt;CODE&gt;IKE negotiation failed with error&lt;/CODE&gt; is detected beforehand. Is there a way to do it?&lt;/P&gt;

&lt;P&gt;Thanks &lt;/P&gt;</description>
    <pubDate>Tue, 01 Aug 2017 00:34:26 GMT</pubDate>
    <dc:creator>ringbbg</dc:creator>
    <dc:date>2017-08-01T00:34:26Z</dc:date>
    <item>
      <title>search query filter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-query-filter/m-p/339378#M159680</link>
      <description>&lt;P&gt;I have a simple search query to look for vpn alerts&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=nm host = inyod1-jvpn1a-dmz8-lo0 syslog_message="*karachi*" KMD_PM_SA_ESTABLISHED OR "IKE negotiation failed with error"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, I want to make splunk return results of &lt;CODE&gt;KMD_PM_SA_ESTABLISHED&lt;/CODE&gt; only when the &lt;CODE&gt;IKE negotiation failed with error&lt;/CODE&gt; is detected beforehand. Is there a way to do it?&lt;/P&gt;

&lt;P&gt;Thanks &lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2017 00:34:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-query-filter/m-p/339378#M159680</guid>
      <dc:creator>ringbbg</dc:creator>
      <dc:date>2017-08-01T00:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: search query filter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-query-filter/m-p/339379#M159681</link>
      <description>&lt;P&gt;Change &lt;CODE&gt;OR&lt;/CODE&gt; to &lt;CODE&gt;AND&lt;/CODE&gt;, which will match both conditions to be true. Even if you take out &lt;STRONG&gt;OR&lt;/STRONG&gt;, by default Splunk will use AND.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2017 02:08:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-query-filter/m-p/339379#M159681</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-08-01T02:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: search query filter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-query-filter/m-p/339380#M159682</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;&amp;gt;  I want to make splunk return results
&amp;gt; of KMD_PM_SA_ESTABLISHED only when the
&amp;gt; IKE negotiation failed with error is
&amp;gt; detected beforehand
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;KMD_PM_SA_ESTABLISHED &lt;BR /&gt;
and &lt;BR /&gt;
"IKE negotiation failed with error" ---- these two are appearing on a single event or different events?&lt;BR /&gt;
as you say "only when the IKE negotiation failed with error is detected beforehand", mostly they would be appearing on the same event. so, simply you can use "AND" instead of the the "OR"&lt;BR /&gt;
&lt;PRE&gt;index=nm host = inyod1-jvpn1a-dmz8-lo0 syslog_message="karachi" KMD_PM_SA_ESTABLISHED AND "IKE negotiation failed with error"&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;AND is always implied on the search by default (for example - search for "one two" means, its actually searching for "one AND two")&lt;/P&gt;

&lt;PRE&gt;index=nm host = inyod1-jvpn1a-dmz8-lo0 syslog_message="karachi" KMD_PM_SA_ESTABLISHED "IKE negotiation failed with error"&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 15:10:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-query-filter/m-p/339380#M159682</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2020-09-29T15:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: search query filter</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-query-filter/m-p/339381#M159683</link>
      <description>&lt;P&gt;Are these 2 conditions contained in the same event or 2 different events?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2017 14:48:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-query-filter/m-p/339381#M159683</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-08-02T14:48:37Z</dc:date>
    </item>
  </channel>
</rss>

