Description for the new unit monitor.
This monitor is an availability monitor for Converged switch port in a UCP Director. If the state is Warning or Error, there could be an issue with the port.
A warning or error for the Converged Switch Port can be caused by a problem with its operational status or UCP monitor mode.
Please check specific Converged Switch port connectivity or check UCP monitor mode on the port.
Target | UCPManagementPack.ConvergedSwitchPort | ||
Parent Monitor | System.Health.AvailabilityState | ||
Category | AvailabilityHealth | ||
Enabled | True | ||
Alert Generate | True | ||
Alert Severity | MatchMonitorHealth | ||
Alert Priority | Normal | ||
Alert Auto Resolve | True | ||
Monitor Type | UCPManagementPack.TimedPowerShell.UnitMonitor | ||
Remotable | True | ||
Accessibility | Internal | ||
Alert Message |
| ||
RunAs | System.PrivilegedMonitoringAccount |
<UnitMonitor ID="UCPManagementPack.ConvergedSwitchUnitMonitor" Accessibility="Internal" Enabled="true" Target="UCPManagementPack.ConvergedSwitchPort" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="UCPManagementPack.TimedPowerShell.UnitMonitor" ConfirmDelivery="false" RunAs="System!System.PrivilegedMonitoringAccount">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="UCPManagementPack.ConvergedSwitchUnitMonitor.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Healthy" MonitorTypeStateID="Healthy" HealthState="Success"/>
<OperationalState ID="Warning" MonitorTypeStateID="Warning" HealthState="Warning"/>
<OperationalState ID="Error" MonitorTypeStateID="Error" HealthState="Error"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>400</IntervalSeconds>
<SyncTime/>
<ScriptName>MonitorConvergedSwitch.ps1</ScriptName>
<ScriptBody>
param($sourceId, $managedEntityId, $managementIps, $domain, $username, $password)
$api = new-object -comObject 'MOM.ScriptAPI'
$bag = $api.CreatePropertyBag()
# Make sure credentials are set
if ($username -and $password) {
add-type "using System.Net; using System.Security.Cryptography.X509Certificates; public class TrustAllCertsPolicy : ICertificatePolicy { public bool CheckValidationResult(ServicePoint srvPoint, X509Certificate certificate, WebRequest request, int certificateProblem) { return true; } }"
[System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy
$secstr = New-Object -TypeName System.Security.SecureString
$password.ToCharArray() | ForEach-Object {$secstr.AppendChar($_)}
$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist "$domain`\$username", $secstr
$url = "https://$managementIps/monitoring/monitorStates?resourceType=ConvergedNetwork"
$resourceName = "$Target/Property[Type='UCPManagementPack.ConvergedSwitchPort']/Name$"
$api.LogScriptEvent("MonitorConvergedSwitch.ps1", 103, 0, "Getting converged switch health data from $url for $resourceName")
$results = Invoke-RestMethod -Uri $url -Credential $cred
$result = $results | where { $_.GlobalResourceId -eq $resourceName }
if ($result.ResourceState -eq "Ok") {
$bag.AddValue("Status","HEALTHY")
} elseif ($result.ResourceState -eq "Error") {
$bag.AddValue("Status","ERROR")
} else {
$bag.AddValue("Status","WARNING")
}
$api.LogScriptEvent("MonitorConvergedSwitch.ps1", 103, 0, "Finished getting converged switch health data for $resourceName")
} else {
$api.LogScriptEvent("MonitorConvergedSwitch.ps1", 103, 0, "Credentials not provided!")
}
$bag
</ScriptBody>
<ManagementIps>$Target/Host/Host/Host/Property[Type='UCPManagementPack.Pod']/ManagementIp$</ManagementIps>
<TimeoutSeconds>300</TimeoutSeconds>
<SourceId>$MPElement$</SourceId>
<ManagedEntityId>$Target/Id$</ManagedEntityId>
</Configuration>
</UnitMonitor>