This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Adding a time interval for alerts

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')

  • 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