1 Reply Latest reply on Oct 21, 2017 8:53 PM by cscoengineer

    Adding a time interval for alerts

    ravicv

      Wrote a query to trigger the alert only during the specified time

      Query getting failed on the timestamp,

      On removing the time stamp, query is getting accepted. Below is the query, kindly suggest

       

      SELECT Nodes.Caption, Nodes.NodeID FROM Nodes

      Join AlertLog on Nodes.NodeID = AlertLog.ObjectID

      Where (City = 'London' and TimeStamp < '10:00:00' and TIMESTAMP >'11:00:00')

        • Re: Adding a time interval for alerts
          cscoengineer

          AlertLog is no longer used, unless you're using a older version of NPM.  For NPM 12.2, the following should work:

           

          SELECT Nodes.Caption, Nodes.NodeID

          FROM Nodes

          Join AlertHistory on Nodes.NodeID = AlertHistory.AlertObjectID

          Where City = 'London' and

             (Convert(Char,AlertHistory.TimeStamp,108) >=  '10:00:00' AND

              Convert(Char,AlertHistory.TimeStamp,108) <= '11:00:00')

           

          Thanks

          Amit