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

Re: Help needed building a SQL variable for use in email alert trigger

$
0
0

check out (NPM 10.6)

SELECT TOP 1000 * FROM ContainerMemberSnapshots where status in (2,3)

 

this will give you the members of a Container (Group) that are down or warning, and the ContainerID

 

here is a more worked example to go from group, to the members with issues:

select * from

(SELECT EntityID GroupID,Name GroupName,Status GroupStatus FROM [dbo].[ContainerMemberSnapshots] where status in (2,3) and ContainerID=1 and EntityType='Orion.Groups') GroupInfo

Inner Join

(SELECT EntityID ,ContainerId,EntityType,Name ,status FROM [dbo].[ContainerMemberSnapshots] where status in (2,3) and ContainerID<>1) ObjectInfo

on GroupInfo.GroupID=ObjectInfo.ContainerId


Viewing all articles
Browse latest Browse all 20607

Trending Articles



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