SCOM: How to check for agent grey state
Hi,
does anyone have a powershell command or SQL query to find out which agents are in Grey state?
Thanks/George
October 15th, 2010 9:20pm
Hi,
Try this:
SELECT ManagedEntityGenericView.DisplayName,
ManagedEntityGenericView.AvailabilityLastModified
FROM ManagedEntityGenericView INNER JOIN
ManagedTypeView ON
ManagedEntityGenericView.MonitoringClassId = ManagedTypeView.IdWHERE (ManagedEntityGenericView.IsAvailable = ‘false’) AND
(ManagedTypeView.Name = ‘Microsoft.SystemCenter.Agent’)
ORDER BY ManagedEntityGenericView.AvailabilityLastModifiedhttp://OpsMgr.ru/
Free Windows Admin Tool Kit Click here and download it now
October 15th, 2010 10:02pm
Hey George
Not quite what you are looking for but a start?
To find all managed computers that are currently down and not pingable:
SELECT bme.DisplayName,s.LastModified as LastModifiedUTC, dateadd(hh,-5,s.LastModified) as 'LastModifiedCST (GMT-5)'
FROM state AS s, BaseManagedEntity AS bme
WHERE s.basemanagedentityid = bme.basemanagedentityid
AND s.monitorid
IN (SELECT MonitorId FROM Monitor WHERE MonitorName = 'Microsoft.SystemCenter.HealthService.ComputerDown')
AND s.Healthstate = '3' AND bme.IsDeleted = '0'
ORDER BY s.Lastmodified DESC
Also
http://support.microsoft.com/kb/2288515
Paul Keely
October 15th, 2010 10:04pm