1 Reply Latest reply on Mar 12, 2014 2:05 AM by JiriPsota

    Can I use multiple custom pollers to trigger an alert ?

    nsimoneau

      Hi,

       

      I'd like to trigger an alert based on two conditions:

      • Custom poller 1 is equal to 'x' AND
      • Custom poller 2 is equal to 'y'

       

      2 pollers alert.PNG

      when I look at the SQL query generated it is absolutely not what I want:

       

      SELECT DISTINCT CustomPollerAssignmentView.CustomPollerAssignmentID AS NetObjectID, CustomPollerAssignmentView.AssignmentName AS Name FROM (CustomPollerStatus INNER JOIN CustomPollerAssignmentView ON (CustomPollerStatus.CustomPollerAssignmentID = CustomPollerAssignmentView.CustomPollerAssignmentID)) LEFT OUTER JOIN CustomPollers ON (CustomPollerAssignmentView.CustomPollerID = CustomPollers.CustomPollerID) WHERE (((CustomPollers.UniqueName = '_______Power') AND (CustomPollerStatus.RawStatus = 0)) AND ((CustomPollers.UniqueName = '_______State') AND (CustomPollerStatus.RawStatus = 3))) AND ((InterfaceID = 0)) 
      Only one set of poller information is queried while I would need two to be able to match the two conditions. As it is right now if the poller matches one statement it's not goign to match the other one.

       

      Any idea how I could work around that?

        • Re: Can I use multiple custom pollers to trigger an alert ?
          JiriPsota

          I suppose both pollers are Custom Node Pollers.

          Edit your Advanced Alert (I mean the one from screenshot), change "Type of Property to Monitor" to "Custom SQL Alert".

          Change WHERE condition to:

           

          WHERE 

          (

            (

             (CustomPollers.UniqueName = <poller1>) AND

             (CustomPollerStatus.RawStatus = 0))

          )

          AND

          (

          (InterfaceID = 0)

          )

          AND CustomPollerAssignmentView.NodeId in (SELECT CustomPollerAssignment.NodeId

          FROM (CustomPollerStatus INNER JOIN CustomPollerAssignment ON (CustomPollerStatus.CustomPollerAssignmentID = CustomPollerAssignment.CustomPollerAssignmentID))  LEFT OUTER JOIN CustomPollers ON (CustomPollerAssignment.CustomPollerID = CustomPollers.CustomPollerID)

          WHERE  (CustomPollers.UniqueName = <poller2>) AND

             (CustomPollerStatus.RawStatus = 3)

          )

           

          Alert should be triggered for poller1 when polled value is 0, but only when polled value on poller2 is 3. You should change also Reset Condition accordingly.