Hi!,

I think you are quit near to the solution:)  You'll just need to select from 
vAlert joining with your group sql.

I think SCOMANSWERS blogged something about that in the spring.  Have a look at 
https://scomanswers.wordpress.com

/Henrik

Fra: [email protected] [mailto:[email protected]] På 
vegne af Pete Hakesley
Sendt: 1. oktober 2015 16:38
Til: MSMOM ([email protected])
Emne: [msmom] SQL Help Please

I have a customer who wants a report of alert over a period based on Groups.

E.g.

SQL Servers - Alerts Report
APP Server = Alerts Report
...

I am struggling to find a way to export all alerts for a Group from the data 
warehouse. Can anyone help.

I have the Groups:-

select *  from vManagedEntity
inner join vRelationship on 
vManagedEntity.ManagedEntityRowId=vRelationship.SourceManagedEntityRowId
inner join vRelationshipType on 
vRelationship.RelationshipTypeRowId=vRelationshipType.RelationshipTypeRowId
inner join vRelationshipManagementGroup on 
vRelationshipManagementGroup.RelationshipRowId=vRelationship.RelationshipRowId
where 
(vRelationshipType.RelationshipTypeSystemName='Microsoft.SystemCenter.ComputerGroupContainsComputer'
or vRelationshipType.RelationshipTypeSystemName like '%InstanceGroup%')
and vRelationshipManagementGroup.ToDateTime is null
order by DisplayName asc


But struggling to associate this to alerts - any help appreciated!

Peter Hakesley | Monitoring & Automation Technical Lead Engineer, Data Centre 
Services

t: +44(0)845 155 6556 ext: 4006
e: [email protected]<mailto:[email protected]> | w: 
www.scc.com<http://www.scc.com/>
a: SCC, CV1, Cole Valley, 20 Westwood Avenue, Tyseley, Birmingham B11 3RZ







Reply via email to