<?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: How to set up an alert to trigger only when both Check Point devices in a High Availability pair fail&amp;gt; in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/How-to-set-up-an-alert-to-trigger-only-when-both-Check-Point/m-p/286741#M5293</link>
    <description>&lt;P&gt;Note: even if my search above works fine it would probably require some tweaking. The variable current should be evaluated once and not twice for instance. You might also want to filter out duplicated results from the final output.&lt;/P&gt;</description>
    <pubDate>Tue, 22 Dec 2015 08:55:54 GMT</pubDate>
    <dc:creator>javiergn</dc:creator>
    <dc:date>2015-12-22T08:55:54Z</dc:date>
    <item>
      <title>How to set up an alert to trigger only when both Check Point devices in a High Availability pair fail&gt;</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-set-up-an-alert-to-trigger-only-when-both-Check-Point/m-p/286739#M5291</link>
      <description>&lt;P&gt;I have a situation where Check Point firewalls work as a pair in HA mode where one device is "hot" while the other is in "stand-by" mode.&lt;BR /&gt;
I need to provide an alert when both devices in a pair fail as this causes a data outage.&lt;/P&gt;

&lt;P&gt;The search below identifies all single devices that do not send logs for the last 5 minutes.  Subsequently, the lookup table Checkpoint-Hosts-122115.csv is pairing that device with its HA pair.  The search shows that the pairing using the lookup table works.  &lt;/P&gt;

&lt;P&gt;My issue is that I have not been able to leverage the pair device to compute its own delay.  As both devices in a pair have to stop sending logs for the outage condition to be met.&lt;/P&gt;

&lt;P&gt;FYI, I use tstats as it is more efficient.  Checkpoint logs are coming from 60 HA pairs are very noisy.  The search runs every 10 mins.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats latest(_time) AS lastTime WHERE index=checkpoint host=* BY host
| eval current=now()
| eval delay1=current-lastTime
| where delay1 &amp;gt; 300
| dedup host
| lookup Checkpoint-Hosts-122115.csv host-pri AS host OUTPUT host-bak
| rename host AS host-pri
| table host-pri delay1 host-bak

host-pri            delay1    host-bak
go-bldxfwbpz-bak    675       go-bldxfwbpz-pri
go-bldxfwbpz-pri    3482     go-bldxfwbpz-bak
go-bldxfwe-bak     4023      go-bldxfwe-pri
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 Dec 2015 18:26:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-set-up-an-alert-to-trigger-only-when-both-Check-Point/m-p/286739#M5291</guid>
      <dc:creator>Thuan</dc:creator>
      <dc:date>2015-12-21T18:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up an alert to trigger only when both Check Point devices in a High Availability pair fail&gt;</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-set-up-an-alert-to-trigger-only-when-both-Check-Point/m-p/286740#M5292</link>
      <description>&lt;P&gt;Let me see if I get this right. Based on your requirements above and the example provided, you would like to be alerted when both primary and backup are down, and therefore you would expect an alert for the following two hosts correct?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host-pri             delay1    host-bak
go-bldxfwbpz-bak     675       go-bldxfwbpz-pri
go-bldxfwbpz-pri     3482      go-bldxfwbpz-bak
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In that case, if you use a subsearch first to return the backup hosts matching your expression above, then use the main search to filter when delay &amp;gt; 300 for those backup hosts and finally using a different lookup that returns your primary from your backup, then I think you should be all right. Something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats latest(_time) AS lastTime WHERE index=checkpoint host=* BY host
| search [
   | tstats latest(_time) AS lastTime WHERE index=checkpoint host=* BY host
   | eval current=now()
   | eval delay1=current-lastTime
   | where delay1 &amp;gt; 300
   | dedup host
   | lookup Checkpoint-Hosts-122115.csv host-pri AS host OUTPUT host-bak
   | rename host AS host2
   | rename host-bak AS host
   | return host
]
| eval current=now()
| eval delay1=current-lastTime
| where delay1 &amp;gt; 300
| dedup host
| lookup Checkpoint-Hosts-122115.csv host-bak AS host OUTPUT host-pri
| rename host AS host-bak
| table host-pri host-bak
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Let me know if that works.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
J&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2015 08:54:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-set-up-an-alert-to-trigger-only-when-both-Check-Point/m-p/286740#M5292</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2015-12-22T08:54:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up an alert to trigger only when both Check Point devices in a High Availability pair fail&gt;</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-set-up-an-alert-to-trigger-only-when-both-Check-Point/m-p/286741#M5293</link>
      <description>&lt;P&gt;Note: even if my search above works fine it would probably require some tweaking. The variable current should be evaluated once and not twice for instance. You might also want to filter out duplicated results from the final output.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2015 08:55:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-set-up-an-alert-to-trigger-only-when-both-Check-Point/m-p/286741#M5293</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2015-12-22T08:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up an alert to trigger only when both Check Point devices in a High Availability pair fail&gt;</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-set-up-an-alert-to-trigger-only-when-both-Check-Point/m-p/286742#M5294</link>
      <description>&lt;P&gt;Good morning Javiern,&lt;BR /&gt;
It works !   I will do some tweaking as your recommended.&lt;BR /&gt;
Thank you a great deal!&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2015 16:18:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-set-up-an-alert-to-trigger-only-when-both-Check-Point/m-p/286742#M5294</guid>
      <dc:creator>Thuan</dc:creator>
      <dc:date>2015-12-22T16:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to set up an alert to trigger only when both Check Point devices in a High Availability pair fail&gt;</title>
      <link>https://community.splunk.com/t5/Alerting/How-to-set-up-an-alert-to-trigger-only-when-both-Check-Point/m-p/286743#M5295</link>
      <description>&lt;P&gt;No worries. I'm glad it worked. &lt;/P&gt;

&lt;P&gt;Please don't forget to mark it as answered if you liked it so that others can benefit from it. &lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2015 16:45:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/How-to-set-up-an-alert-to-trigger-only-when-both-Check-Point/m-p/286743#M5295</guid>
      <dc:creator>javiergn</dc:creator>
      <dc:date>2015-12-22T16:45:12Z</dc:date>
    </item>
  </channel>
</rss>

