public override MonitoringData InternalRunCheck() { MonitoringData monitoringData = new MonitoringData(); if (base.ExchangeServer.AdminDisplayVersion.Major < MailboxAssistantsProcessingEvents.minExpectedServerVersion.Major || (base.ExchangeServer.AdminDisplayVersion.Major == MailboxAssistantsProcessingEvents.minExpectedServerVersion.Major && base.ExchangeServer.AdminDisplayVersion.Minor < MailboxAssistantsProcessingEvents.minExpectedServerVersion.Minor)) { monitoringData.Events.Add(new MonitoringEvent(AssistantTroubleshooterBase.EventSource, 5101, EventTypeEnumeration.Warning, Strings.TSMinServerVersion(MailboxAssistantsProcessingEvents.minExpectedServerVersion.ToString()))); } else { MonitoringPerformanceCounter mdbstatusUpdateCounterValue = this.GetMDBStatusUpdateCounterValue(); if (mdbstatusUpdateCounterValue != null) { monitoringData.PerformanceCounters.Add(mdbstatusUpdateCounterValue); if (mdbstatusUpdateCounterValue.Value > this.MaxWaitTime) { monitoringData.Events.Add(new MonitoringEvent(AssistantTroubleshooterBase.EventSource, 5206, EventTypeEnumeration.Error, Strings.AIDatabaseStatusPollThreadHung(base.ExchangeServer.Name, mdbstatusUpdateCounterValue.Value))); } } else { monitoringData.Events.Add(this.TSMDBperformanceCounterNotLoaded(base.ExchangeServer.Name, "Elapsed Time since Last Database Status Update Attempt")); } List <MdbStatus> onlineMDBList = base.GetOnlineMDBList(); int maximumEventQueueSize = this.GetMaximumEventQueueSize(base.ExchangeServer.Fqdn); foreach (MdbStatus mdbStatus in onlineMDBList) { string mdbName = mdbStatus.MdbName; MonitoringPerformanceCounter mdblastEventPollingAttemptCounterValue = this.GetMDBLastEventPollingAttemptCounterValue(mdbName); if (mdblastEventPollingAttemptCounterValue == null) { monitoringData.Events.Add(this.TSMDBperformanceCounterNotLoaded(base.ExchangeServer.Name, "Elapsed Time since Last Event Polling Attempt")); } else { monitoringData.PerformanceCounters.Add(mdblastEventPollingAttemptCounterValue); if (mdblastEventPollingAttemptCounterValue.Value > this.MaxWaitTime) { monitoringData.Events.Add(new MonitoringEvent(AssistantTroubleshooterBase.EventSource, 5205, EventTypeEnumeration.Error, Strings.AIMDBLastEventPollingThreadHung(base.ExchangeServer.Name, mdbName, mdblastEventPollingAttemptCounterValue.Value))); } } MonitoringPerformanceCounter mdblastEventPolledCounterValue = this.GetMDBLastEventPolledCounterValue(mdbName); if (mdblastEventPolledCounterValue == null) { monitoringData.Events.Add(this.TSMDBperformanceCounterNotLoaded(base.ExchangeServer.Name, "Elapsed Time Since Last Event Polled")); } MonitoringPerformanceCounter mdbeventsInQueueCounterValue = this.GetMDBEventsInQueueCounterValue(mdbName); if (mdbeventsInQueueCounterValue == null) { monitoringData.Events.Add(this.TSMDBperformanceCounterNotLoaded(base.ExchangeServer.Name, "Events in queue")); } if (mdblastEventPolledCounterValue != null && mdbeventsInQueueCounterValue != null) { monitoringData.PerformanceCounters.Add(mdblastEventPolledCounterValue); monitoringData.PerformanceCounters.Add(mdbeventsInQueueCounterValue); if (mdbeventsInQueueCounterValue.Value >= (double)maximumEventQueueSize && mdblastEventPolledCounterValue.Value > this.MaxWaitTime) { monitoringData.Events.Add(new MonitoringEvent(AssistantTroubleshooterBase.EventSource, 5205, EventTypeEnumeration.Error, Strings.AIMDBLastEventPollingThreadHung(base.ExchangeServer.Name, mdbName, mdblastEventPolledCounterValue.Value))); } } } } return(monitoringData); }