Active Directory replication is failing for one or more partitions: Status 8524 - The DSA operation is unable to proceed because of a DNS lookup failure
http://go.microsoft.com/fwlink/?LinkId=229715
Target | Microsoft.KnowledgeServices.Windows.Server.AD.ConnectionObject | ||
Parent Monitor | System.Health.ConfigurationState | ||
Category | Alert | ||
Enabled | True | ||
Alert Generate | True | ||
Alert Severity | Error | ||
Alert Priority | Normal | ||
Alert Auto Resolve | True | ||
Monitor Type | Microsoft.KnowledgeServices.Library.PowerShellMonitorEx | ||
Remotable | True | ||
Accessibility | Public | ||
Alert Message |
| ||
RunAs | Default | ||
Comment | SupportTopic=TBD;VersionNumber=1.0.1.0; |
<UnitMonitor ID="Monitor_AK550654" Comment="SupportTopic=TBD;VersionNumber=1.0.1.0;" Accessibility="Public" Enabled="true" Target="MicrosoftKnowledgeServicesWindowsServerADLibrary!Microsoft.KnowledgeServices.Windows.Server.AD.ConnectionObject" ParentMonitorID="Health!System.Health.ConfigurationState" Remotable="true" Priority="Normal" TypeID="KnowledgeServicesLibrary!Microsoft.KnowledgeServices.Library.PowerShellMonitorEx" ConfirmDelivery="true">
<Category>Alert</Category>
<AlertSettings AlertMessage="MonitorMessage73d26e55eb0f4564b3fc8e55dfcca4b7">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/Property[@Name='AllNamingContextDNs']$</AlertParameter1>
<AlertParameter2>$Data/Context/Property[@Name='NamingContextDN']$</AlertParameter2>
<AlertParameter3>$Data/Context/Property[@Name='LastSyncResult']$</AlertParameter3>
<AlertParameter4>$Data/Context/Property[@Name='NumConsecutiveSyncFailures']$</AlertParameter4>
<AlertParameter5>$Data/Context/Property[@Name='SourceDsaSite']$</AlertParameter5>
<AlertParameter6>$Data/Context/Property[@Name='TimeOfLastSyncAttempt']$</AlertParameter6>
<AlertParameter7>$Data/Context/Property[@Name='TimeOfLastSyncSuccess']$</AlertParameter7>
<AlertParameter8>$Data/Context/Property[@Name='USNLastObjChangeSynced']$</AlertParameter8>
<AlertParameter9>$Data/Context/Property[@Name='Writeable']$</AlertParameter9>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Success" MonitorTypeStateID="Success" HealthState="Success"/>
<OperationalState ID="Error" MonitorTypeStateID="Error" HealthState="Error"/>
</OperationalStates>
<Configuration>
<ScriptName>AK550654.ps1</ScriptName>
<Parameters>
<Parameter>
<Name>ConnectionName</Name>
<Value>$Target/Property[Type="MicrosoftKnowledgeServicesWindowsServerADLibrary!Microsoft.KnowledgeServices.Windows.Server.AD.ConnectionObject"]/Name$</Value>
</Parameter>
</Parameters>
<ScriptBody>
param($ConnectionName)
$ErrorActionPreference = "Stop"
# Set up the arguments
$scriptargs = new-object psobject
$scriptargs | add-member NoteProperty "ConnectionName" $ConnectionName
# Set up the output
$global:scriptoutput = new-object psobject
$scriptoutput | add-member NoteProperty "HasIssue" $false
$scriptoutput | add-member NoteProperty "AllNamingContextDNs" ""
$scriptoutput | add-member NoteProperty "NamingContextDN" ""
$scriptoutput | add-member NoteProperty "LastSyncResult" ""
$scriptoutput | add-member NoteProperty "NumConsecutiveSyncFailures" ""
$scriptoutput | add-member NoteProperty "SourceDsaSite" ""
$scriptoutput | add-member NoteProperty "TimeOfLastSyncAttempt" ""
$scriptoutput | add-member NoteProperty "TimeOfLastSyncSuccess" ""
$scriptoutput | add-member NoteProperty "USNLastObjChangeSynced" ""
$scriptoutput | add-member NoteProperty "Writeable" $false
Function GetReplicationStatus([string] $SourceDsaCN, [int] $LastSyncResultToQuery) {
Get-WmiObject -Class msad_replneighbor -namespace root\microsoftactivedirectory |
Where-Object {($_.LastSyncResult -eq $LastSyncResultToQuery) -and ($_.SourceDsaCN -eq $SourceDsaCN)} |
Sort-Object TimeOfLastSyncAttempt
}
function AdvisorRule($scriptargs, $scriptoutput)
{
$scriptoutput.HasIssue=$false
$ErrorNumber = 0
#ConnectionName argument comes in DOMAIN\COMPUTERNAME. We need only the COMPUTERNAME to compose the $SourceDsaCN
$SourceDsaCN = $ScriptArgs.ConnectionName.Split("\")[1]
$LastSyncResultToQuery = 8524
$replneighbor = GetReplicationStatus $SourceDsaCN $LastSyncResultToQuery
If ($replneighbor -ne $null)
{
$NamingContextDNs = ""
$NamingContextDNArray = @()
foreach ($neighbor in $replneighbor)
{
$ErrorNumber++
If ($ErrorNumber -eq 1)
{
$scriptoutput.NamingContextDN = $neighbor.NamingContextDN
$scriptoutput.LastSyncResult = $neighbor.LastSyncResult
$scriptoutput.NumConsecutiveSyncFailures = $neighbor.NumConsecutiveSyncFailures
$scriptoutput.SourceDsaSite = $neighbor.SourceDsaSite
$scriptoutput.TimeOfLastSyncAttempt = [management.managementDateTimeConverter]::ToDateTime($neighbor.TimeOfLastSyncAttempt).AddMinutes([System.TimeZoneInfo]::Local.BaseUtcOffset.TotalMinutes * -1)
$scriptoutput.TimeOfLastSyncSuccess = [management.managementDateTimeConverter]::ToDateTime($neighbor.TimeOfLastSyncSuccess).AddMinutes([System.TimeZoneInfo]::Local.BaseUtcOffset.TotalMinutes * -1)
$scriptoutput.USNLastObjChangeSynced = $neighbor.USNLastObjChangeSynced
$scriptoutput.Writeable = $neighbor.Writeable
}
else
{
$NamingContextDNArray += "(" + $neighbor.NamingContextDN + ")"
}
}
if ($ErrorNumber -gt 0)
{
$scriptoutput.AllNamingContextDNs = [string]::Join(", ", $NamingContextDNArray)
$scriptoutput.HasIssue = $true
}
}
}
AdvisorRule $scriptargs $scriptoutput
# set the output
$mom = new-object -comobject "MOM.ScriptAPI"
$bag = $mom.CreatePropertyBag()
if ($scriptoutput.HasIssue -ne $null)
{
$bag.AddValue("HasIssue", $scriptoutput.HasIssue)
}
if ($scriptoutput.AllNamingContextDNs -ne $null)
{
$bag.AddValue("AllNamingContextDNs", $scriptoutput.AllNamingContextDNs)
}
if ($scriptoutput.NamingContextDN -ne $null)
{
$bag.AddValue("NamingContextDN", $scriptoutput.NamingContextDN)
}
if ($scriptoutput.LastSyncResult -ne $null)
{
$bag.AddValue("LastSyncResult", $scriptoutput.LastSyncResult)
}
if ($scriptoutput.NumConsecutiveSyncFailures -ne $null)
{
$bag.AddValue("NumConsecutiveSyncFailures", $scriptoutput.NumConsecutiveSyncFailures)
}
if ($scriptoutput.SourceDsaSite -ne $null)
{
$bag.AddValue("SourceDsaSite", $scriptoutput.SourceDsaSite)
}
if ($scriptoutput.TimeOfLastSyncAttempt -ne $null)
{
$bag.AddValue("TimeOfLastSyncAttempt", $scriptoutput.TimeOfLastSyncAttempt)
}
if ($scriptoutput.TimeOfLastSyncSuccess -ne $null)
{
$bag.AddValue("TimeOfLastSyncSuccess", $scriptoutput.TimeOfLastSyncSuccess)
}
if ($scriptoutput.USNLastObjChangeSynced -ne $null)
{
$bag.AddValue("USNLastObjChangeSynced", $scriptoutput.USNLastObjChangeSynced)
}
if ($scriptoutput.Writeable -ne $null)
{
$bag.AddValue("Writeable", $scriptoutput.Writeable)
}
$bag
</ScriptBody>
<SnapIns/>
<TimeoutSeconds>300</TimeoutSeconds>
<Schedule>86384</Schedule>
<ErrorExpression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Boolean">Property[@Name='HasIssue']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="Boolean">true</Value>
</ValueExpression>
</SimpleExpression>
</ErrorExpression>
<SuccessExpression>
<Not>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Boolean">Property[@Name='HasIssue']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="Boolean">true</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</Not>
</SuccessExpression>
</Configuration>
</UnitMonitor>