Top Rule Generated Alerts (Report Dataset)

/*Top rule generated alerts report dataset Jonathan Almquist (http://blogs.technet.com/b/jonathanalmquist/) 04-08-2011 */   DECLARE @RowCount AS INT, @MGID AS INT, @TimeZoneOffset AS INT, @OffSetDays AS INT, @StartDate AS DATE, @EndDate AS DATE SET @RowCount = 20 SET @MGID = 1 SET @TimeZoneOffset = 5 SET @OffSetDays = 60 SET @StartDate = DATEADD(hour, @TimeZoneOffset, DATEADD(day, -@OffSetDays, GETDATE()))…

0

Gray Agents With Reason

/* Gray agents with reason http://blogs.technet.com/b/jonathanalmquist/ 02-26-2011 */ SELECT ME.Path, HSO.StartDateTime AS OutageStartDateTime, DATEDIFF (DD, hso.StartDateTime, GETDATE()) AS OutageDays, HSO.ReasonCode, DS.Name AS ReasonString FROM vManagedEntity AS ME INNER JOIN vHealthServiceOutage AS HSO ON HSO.ManagedEntityRowId = ME.ManagedEntityRowId INNER JOIN vStringResource AS SR ON HSO.ReasonCode = REPLACE(LEFT(SR.StringResourceSystemName, LEN(SR.StringResourceSystemName) – CHARINDEX(‘.’, REVERSE(SR.StringResourceSystemName))), ‘System.Availability.StateData.Reasons.’, ”) INNER JOIN vDisplayString AS…

2