Ambari API Credentials

Microsoft.HDInsight.UnitMonitor.ApiAccessDenied (UnitMonitor)

This monitor checks if provided credentials have enough permissions to access Ambari API.

Knowledge Base article:

Summary

This monitor checks if provided credentials have enough permissions to access Ambari API by executing synthetic transaction to clusters list URL.

Causes

Server returned "(401) Unauthorized" or "(403) Forbidden" when trying to access Ambari API.

Resolutions

Make sure that credentials specified in the RunAs account, associated with target HDInsight service, are correct.

If account password has been changed or reset recently, your Run As account needs to reflect this change as well.

Element properties:

TargetMicrosoft.HDInsight.Ambari
Parent MonitorSystem.Health.AvailabilityState
CategoryAvailabilityHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.HDInsight.UnitMonitorType.SyntheticTransaction
RemotableTrue
AccessibilityPublic
Alert Message
Invalid Ambari API credentials.
Credentials provided for Ambari service hosted at "{0}" are not valid. Error: {1}
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.HDInsight.UnitMonitor.ApiAccessDenied" TypeID="Microsoft.HDInsight.UnitMonitorType.SyntheticTransaction" Target="Microsoft.HDInsight.Ambari" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" Accessibility="Public" Enabled="true" ConfirmDelivery="true">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Microsoft.HDInsight.UnitMonitor.ApiAccessDenied.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="Microsoft.HDInsight.Ambari"]/AmbariUri$</AlertParameter1>
<AlertParameter2>$Data/Context/Property[@Name='Description']$</AlertParameter2>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Healthy" MonitorTypeStateID="Healthy" HealthState="Success"/>
<OperationalState ID="Unhealthy" MonitorTypeStateID="Unhealthy" HealthState="Error"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>900</IntervalSeconds>
<TimeoutSeconds>300</TimeoutSeconds>
<UnhealthyStatusPattern>^(Forbidden|Unauthorized)$</UnhealthyStatusPattern>
</Configuration>
</UnitMonitor>