WindowsAzurePack.Monitor.UnexpectedException.AdminSite (UnitMonitor)

Knowledge Base article:

Summary

Checks for the occurrence of error Event 160. This error indicates that an unexpected exception was encountered.

Causes

Whenever the monitor is in Warning or Error state then an attempt to execute a request by the reporting WAP component failed or a worker job tried to execute and failed (job examples: Subscription creation, Plan updates, etc.). See the following conditions to decide if further investigation is required:

If the system is working correctly and the monitor is in Warning or Error then a transient network issue may have caused the event. No need to act on it.

If monitor is in Warning or Error and another alert has been reported then make note of the affected machine and component, open the Windows Event Log in that machine and look for the event log for the component: applications -> Microsoft -> Windows Azure Pack -> MgmtSvc-[component] -> Operational.

Some potential root causes include:

Windows Azure Pack SQL Servers or Databases not available

Network failure

Access account credentials (or certificates) expired or account permissions were changed

Hardware failure

Power failure

Resolution

If Event 160 Alert (Unexpected Exception) occurs in conjunction with other Error alerts, find the Event(s) in the affected server(s). The description will provide information as to what failed, this information in conjunction with any other error may provide the clues to the root cause of the problem. Once the issue has been resolved, you can manually close the alert or wait for 30 minutes when the alert will be reset automatically.

Configuration

For this monitor to work correctly, it must have permission to access the Event Log.

Element properties:

TargetWindowsAzurePack.AdminSite
Parent MonitorSystem.Health.AvailabilityState
CategoryAvailabilityHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeWindowsAzurePack.MonitorType.CustomSingleEventLogTimer2StateMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
Error: Windows Azure Pack Site Unexpected Exception Error Alert
Error: Site encountered an unknown exception. Event 160. Refer to the Event Log event description for more information.
RunAsDefault
CommentWAP Monitor Event for WAP Server

Source Code:

<UnitMonitor ID="WindowsAzurePack.Monitor.UnexpectedException.AdminSite" Accessibility="Public" Enabled="true" Target="WindowsAzurePack.AdminSite" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="WindowsAzurePack.MonitorType.CustomSingleEventLogTimer2StateMonitorType" ConfirmDelivery="false" Comment="WAP Monitor Event for WAP Server">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="WindowsAzurePack.Monitor.UnexpectedException.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
</AlertSettings>
<OperationalStates>
<OperationalState ID="ErrorEventRaised" MonitorTypeStateID="EventRaised" HealthState="Error"/>
<OperationalState ID="TimerEventRaised" MonitorTypeStateID="TimerEventRaised" HealthState="Success"/>
</OperationalStates>
<Configuration>
<!-- Computer name for the first event. We will use a variable to get the target computer name. -->
<ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<!-- Name of the log containing the first event. -->
<LogName>Microsoft-WindowsAzurePack-MgmtSvc-AdminSite/Operational</LogName>
<!-- Expression for the first event -->
<Expression>
<And>
<!-- Expression for the first event number -->
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">160</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<!-- Expression for the first event source -->
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Microsoft-WindowsAzurePack-MgmtSvc-AdminSite</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
<TimerWaitInSeconds>10800</TimerWaitInSeconds>
</Configuration>
</UnitMonitor>