database query

database query

You had previously provided me with a couple of database queries to show alerts, thresholds etc.  One shows the Windows services we have set up to alert for, but doesn't tell you what server.   I have a fair number of sql servers monitoring the same services & would like to be able to see the server name.  
 
The query is: 
 

Alerts Configured for availability & health of Monitors:
SELECT
AM_ManagedObject.DISPLAYNAME MONITORNAME,AM_ManagedObject.TYPE
MONITORTYPE,AM_ATTRIBUTES.DISPLAYNAME ATTRIBUTENAME,case
AM_ATTRIBUTEACTIONMAPPER.SEVERITY when 5 then 'clear' when 4 then 'warning' when
1 then 'critical' else '' end as
SEVERITY,IFNULL(AM_ACTIONPROFILE.NAME,'')ACTIONNAME FROM
AM_ManagedObject,AM_ATTRIBUTES,AM_ATTRIBUTEACTIONMAPPER,AM_ACTIONPROFILE where
AM_ManagedObject.RESOURCEID=AM_ATTRIBUTEACTIONMAPPER.ID and
AM_ATTRIBUTES.ATTRIBUTEID=AM_ATTRIBUTEACTIONMAPPER.ATTRIBUTE and
AM_ACTIONPROFILE.ID=AM_ATTRIBUTEACTIONMAPPER.ACTIONID order by
AM_ManagedObject.DISPLAYNAME;









 
 
an example of the output for services is:
SQLSERVERAGENT Service Availability critical DBA Alert 4
 


Is there any modification you can provide that would give the server name?

 
Thank you.

                New to ADSelfService Plus?