Quantcast
Channel: THWACK: Message List
Viewing all articles
Browse latest Browse all 20396

Re: Advanced SQL Alert not working as expected

$
0
0

May or may not make sense:

I didn't spend a lot of time so not sure what exactly you are trying to do, but something to test would be to just start your join in the bottom section...example:

select nodeid, sysname from Nodes  - this being basically what the "top" part is..

 

    left join Thresholds t on Nodes.NodeID=t.InstanceId   -- start w/ your joins (assuming that makes sense)

WHERE 

(

    (Nodes.Dept = 'UnixAlerts') AND

    (Nodes.MuteNode = 0) AND

    (Nodes.MuteNodeMemory = 0) AND

    (

        (Nodes.realm = 'Production') OR

        (Nodes.realm = 'Staging')

    )

    AND

    (

        (

          (t.Critical IS NOT NULL) AND

          (Nodes.PercentMemoryUsed >= t.Critical)

        )

        OR

        (

          (t.Critical IS NULL) AND

          (Nodes.PercentMemoryUsed >= 85)

        )

    )

)


Viewing all articles
Browse latest Browse all 20396

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>