<?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: And condition in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/And-condition/m-p/670561#M15560</link>
    <description>&lt;P&gt;How to extract customer number from the event .pls advise&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 03 Dec 2023 15:22:06 GMT</pubDate>
    <dc:creator>Pravinsugi</dc:creator>
    <dc:date>2023-12-03T15:22:06Z</dc:date>
    <item>
      <title>And condition</title>
      <link>https://community.splunk.com/t5/Alerting/And-condition/m-p/670558#M15557</link>
      <description>&lt;P&gt;I have below message in the splunk log&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ex : s1 event has been received for customer 15778&lt;/P&gt;&lt;P&gt;S2 event has been received for customer 15778&lt;/P&gt;&lt;P&gt;S3 event has been received for customer 15778&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to check all S1,S2,S3 event has been received message present in the particular customer.i used AND condition but not able to achieve.plesse help me on this.&lt;/P&gt;&lt;P&gt;As per my scenario,if i have 1 lakhs customer, i want to check for all 3 events has been received mesage is present in the splunk log for one particular customer.if not present all 3 mesage i need to set up alert.&lt;/P&gt;</description>
      <pubDate>Sun, 03 Dec 2023 14:01:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/And-condition/m-p/670558#M15557</guid>
      <dc:creator>Pravinsugi</dc:creator>
      <dc:date>2023-12-03T14:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: And condition</title>
      <link>https://community.splunk.com/t5/Alerting/And-condition/m-p/670559#M15558</link>
      <description>&lt;P&gt;The AND operator works within a single event.&amp;nbsp; To combine multiple events you need to use an aggregating command.&amp;nbsp; Assuming the customer number has been extracted into a field called "customer" then this will trigger an alert if any customer does not have all three events.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;&amp;lt;some search for S1, S2, and S3&amp;gt;&amp;gt;
| stats count by customer
| where count &amp;lt; 3&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 03 Dec 2023 15:04:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/And-condition/m-p/670559#M15558</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2023-12-03T15:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: And condition</title>
      <link>https://community.splunk.com/t5/Alerting/And-condition/m-p/670560#M15559</link>
      <description>&lt;P&gt;Assuming customer and event have already been extracted&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats values(event) as events by customer
| where NOT (events = "s1" AND events = "s2" AND events = "s3")&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 03 Dec 2023 15:09:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/And-condition/m-p/670560#M15559</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-12-03T15:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: And condition</title>
      <link>https://community.splunk.com/t5/Alerting/And-condition/m-p/670561#M15560</link>
      <description>&lt;P&gt;How to extract customer number from the event .pls advise&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 03 Dec 2023 15:22:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/And-condition/m-p/670561#M15560</guid>
      <dc:creator>Pravinsugi</dc:creator>
      <dc:date>2023-12-03T15:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: And condition</title>
      <link>https://community.splunk.com/t5/Alerting/And-condition/m-p/670562#M15561</link>
      <description>&lt;P&gt;How to extract customer number ?&lt;/P&gt;</description>
      <pubDate>Sun, 03 Dec 2023 15:22:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/And-condition/m-p/670562#M15561</guid>
      <dc:creator>Pravinsugi</dc:creator>
      <dc:date>2023-12-03T15:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: And condition</title>
      <link>https://community.splunk.com/t5/Alerting/And-condition/m-p/670563#M15562</link>
      <description>&lt;LI-CODE lang="markup"&gt;| rex "customer (?&amp;lt;customer&amp;gt;\d+)"&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 03 Dec 2023 15:24:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/And-condition/m-p/670563#M15562</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-12-03T15:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: And condition</title>
      <link>https://community.splunk.com/t5/Alerting/And-condition/m-p/670564#M15563</link>
      <description>&lt;P&gt;I have below query .how to include into result query.pls advise&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Need to include this one into result query&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;| stats values(event) as events by customer | where NOT (events = "s1" AND events = "s2" AND events = "s3")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Result query:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(index=1 sourcetype="abc" "s1 event received" and "s2 event received" and "s3 event received") OR (index=2 sourcetype="xyz" "created") | rex "(?&amp;lt;e_type&amp;gt;s.) event received for (?&amp;lt;customer&amp;gt;\d+)" | rex "(?&amp;lt;created&amp;gt;created) for (?&amp;lt;customer&amp;gt;\d+)" | stats max(eval(if(e_type="s3",_time, null()))) as last_e_type max(eval(if(created="created", _time, null()))) as created_time dc(e_type) as e_types values(created) as created by customer | addinfo | where e_types=3 AND (created_time-last_e_type &amp;gt; 300 OR (isnull(created_time) AND info_max_time - last_e_type &amp;gt; 300)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 03 Dec 2023 15:29:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/And-condition/m-p/670564#M15563</guid>
      <dc:creator>Pravinsugi</dc:creator>
      <dc:date>2023-12-03T15:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: And condition</title>
      <link>https://community.splunk.com/t5/Alerting/And-condition/m-p/670565#M15564</link>
      <description>&lt;P&gt;It depends on what you are trying to do since this search seems to be the opposite of what you had previously said you were trying to do.&lt;/P&gt;</description>
      <pubDate>Sun, 03 Dec 2023 15:37:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/And-condition/m-p/670565#M15564</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-12-03T15:37:13Z</dc:date>
    </item>
  </channel>
</rss>

