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

Re: Alerts on Groups

$
0
0

We build all of our groups dynamically off custom properties anyway.

 

but here is a custom SQL query based off the volume to alert on members of the Firewalls group with less than 10% free disk space.

Customize as appropriate.

 

WHERE (

  (

    100-NULLIF(volumepercentused,-2)<10

  )

  AND

  (

    nodes.nodeidIN

    (

               SELECT     cms.entityid

               FROM       containersc

               INNERJOINcontainermembersnapshotscms

               ON         cms.containerid=c.containerid

               WHERE      cms.entitytype='Orion.Nodes'

               AND        c.name='Firewalls')

  )

)


[comment: the clear condition is not simply the reverse of this]

here is the clear:

WHERE (

  (

    100-NULLIF(volumepercentused,-2)>10

  )

  OR

  (

    nodes.nodeidNOT IN

    (

               SELECT     cms.entityid

               FROM       containersc

               INNERJOINcontainermembersnapshotscms

               ON         cms.containerid=c.containerid

               WHERE      cms.entitytype='Orion.Nodes'

               AND        c.name='Firewalls')

  )

)


Viewing all articles
Browse latest Browse all 20396

Trending Articles



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