protected override void RaiseRedEvent(IHealthValidationResultMinimal result)
 {
     ReplayCrimsonEvents.DatabaseLevelSiteAvailabilityCheckFailed.Log <string, int, string, Guid>(base.Identity, result.HealthyCopiesCount, EventUtil.TruncateStringInput(result.ErrorMessage, 32766), base.IdentityGuid);
     new EventNotificationItem("msexchangerepl", "DatabaseCopyAvailability", "SingleAvailableCopyCheckFailed", EventUtil.TruncateStringInput(result.ErrorMessage, 32766), ResultSeverityLevel.Critical)
     {
         StateAttribute1 = EventUtil.TruncateStringInput(result.ErrorMessage, 32766)
     }.Publish(false);
 }
 protected override void RaiseRedEvent(IHealthValidationResultMinimal result)
 {
     ReplayEventLogConstants.Tuple_MonitoringDatabaseRedundancyCheckFailed.LogEvent(null, new object[]
     {
         base.Identity,
         result.HealthyCopiesCount,
         EventUtil.TruncateStringInput(result.ErrorMessage, 32766)
     });
     ReplayCrimsonEvents.DatabaseLevelRedundancyCheckFailed.Log <string, int, string, Guid>(base.Identity, result.HealthyCopiesCount, EventUtil.TruncateStringInput(result.ErrorMessage, 32766), base.IdentityGuid);
 }
Esempio n. 3
0
 protected override void RaiseGreenEvent(IHealthValidationResultMinimal result)
 {
     ReplayCrimsonEvents.DatabaseLevelAvailabilityCheckPassed.Log <string, int, string, Guid>(base.Identity, result.HealthyCopiesCount, EventUtil.TruncateStringInput(result.ErrorMessage, 32766), base.IdentityGuid);
 }
 protected override void RaiseRedEvent(IHealthValidationResultMinimal result)
 {
     if (!this.m_suppressEventsDueToStartup)
     {
         ReplayCrimsonEvents.PotentialRedundancyAlertByRemoteServerCheckFailed.Log <string, string, string>(Environment.MachineName, this.RemoteServer, EventUtil.TruncateStringInput(result.ErrorMessage, 32766));
         new EventNotificationItem("msexchangerepl", "DatabaseRedundancy", "PotentialOneCopyByRemoteServerEvent", ResultSeverityLevel.Critical)
         {
             StateAttribute1 = this.RemoteServer,
             StateAttribute2 = EventUtil.TruncateStringInput(result.ErrorMessage, 16383)
         }.Publish(false);
     }
 }
Esempio n. 5
0
 protected override void RaiseRedEvent(IHealthValidationResultMinimal result)
 {
     ReplayCrimsonEvents.ServerLevelDatabaseStaleStatusCheckFailed.Log <string, string>(base.Identity, EventUtil.TruncateStringInput(result.ErrorMessage, 32766));
     MonitoringAlert.Tracer.TraceError((long)this.GetHashCode(), "ServerLevelDatabaseStaleStatusAlert: RaiseRedEvent() called! Recovery will be attempted via Bugcheck.");
     BugcheckHelper.TriggerBugcheckIfRequired(DateTime.UtcNow, "ServerLevelDatabaseStaleStatusAlert is attempting recovery via BugCheck due to hung GetCopyStatus() RPC.");
 }
        private bool IsCopyHealthy(CopyStatusClientCachedEntry status, CopyStatusClientCachedEntry activeStatus, ICopyStatusClientLookup statusLookup)
        {
            DatabaseValidationCheck.Arguments arguments = new DatabaseValidationCheck.Arguments(status.ServerContacted, status.ActiveServer, this.Database, status, activeStatus, statusLookup, this.m_adConfig, this.m_propertyUpdateTracker, this.m_ignoreActivationDisfavored, this.m_isCopyRemoval, this.m_ignoreMaintenanceChecks, this.m_ignoreTooManyActivesCheck);
            DatabaseValidationMultiChecks     databaseValidationMultiChecks = status.IsActive ? this.ActiveCopyChecks : this.PassiveCopyChecks;

            foreach (DatabaseValidationCheck databaseValidationCheck in databaseValidationMultiChecks)
            {
                LocalizedString empty = LocalizedString.Empty;
                switch (databaseValidationCheck.Validate(arguments, ref empty))
                {
                case DatabaseValidationCheck.Result.Warning:
                    if (!this.m_skipEvents)
                    {
                        ReplayCrimsonEvents.DatabaseCopyValidationCheckWarning.LogPeriodic <string, string, string>(arguments.DatabaseCopyName.GetHashCode() ^ databaseValidationCheck.CheckName.GetHashCode(), DiagCore.DefaultEventSuppressionInterval, arguments.DatabaseCopyName, databaseValidationCheck.CheckName, EventUtil.TruncateStringInput(empty, 32766));
                    }
                    break;

                case DatabaseValidationCheck.Result.Failed:
                    this.RecordError(status.ServerContacted, empty);
                    if (databaseValidationCheck.CheckId == DatabaseValidationCheck.ID.DatabaseCheckCopyStatusNotStale)
                    {
                        this.m_isAnyCachedCopyStatusStale = true;
                    }
                    return(false);
                }
            }
            return(true);
        }