Exemple #1
0
 private void ProcessDatabase(IADDatabase db, IMonitoringADConfig adConfig)
 {
     if (!DatabaseHealthMonitor.ShouldMonitorDatabase(db))
     {
         this.m_dbAlerts.ResetState(db.Guid);
         return;
     }
     this.RaiseDatabaseRedundancyAlertIfNecessary(db, adConfig);
     this.RaiseDatabaseAvailabilityAlertIfNecessary(db, adConfig);
     this.RaiseDatabasePotentialRedundancyAlertIfNecessary(db, adConfig);
 }
Exemple #2
0
        // Token: 0x060013BD RID: 5053 RVA: 0x000506CC File Offset: 0x0004E8CC
        private IEnumerable <IHealthValidationResultMinimal> RunChecks <TValidator>(Func <IADDatabase, TValidator> createValidatorFunc, Guid?dbGuid = null, bool skipUnMonitoredDatabase = true) where TValidator : DatabaseValidatorBase
        {
            IEnumerable <IADDatabase> databases = this.ADConfig.DatabasesIncludingMisconfiguredMap[this.ADConfig.TargetServerName];

            foreach (IADDatabase db in databases)
            {
                if ((!skipUnMonitoredDatabase || DatabaseHealthMonitor.ShouldMonitorDatabase(db)) && (dbGuid == null || db.Guid.Equals(dbGuid.Value)))
                {
                    TValidator validator = createValidatorFunc(db);
                    IHealthValidationResultMinimal result = validator.Run();
                    yield return(result);
                }
            }
            yield break;
        }