Description for the new unit monitor.
This monitor is an availability monitor for Storage in a UCP Director. If the state is Warning or Error, there could be an issue with the Storage System or with a related Storage component.
A warning or error for the Storage can be caused by a problem with the Controller or Unit.
Please check specific the Storage System in UCP Director for details.
Target | UCPManagementPack.StorageDKUFan | ||
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.StorageDKUFanUnitMonitor" Accessibility="Internal" Enabled="true" Target="UCPManagementPack.StorageDKUFan" 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.StorageDKUFanUnitMonitor.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>MonitorStorageDKUFan.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/api/storagesystems"
$resourceName = "$Target/Host/Property[Type='UCPManagementPack.Storage']/Name$"
$api.LogScriptEvent("MonitorStorageDKUFan.ps1", 103, 0, "Getting storage DKU Fan health data from $url for $resourceName")
$results = Invoke-RestMethod -Uri $url -Credential $cred
$result = $results | where { $_.GlobalResourceId -eq $resourceName }
$result.ComponentStatuses | foreach {
if ($_.Name -eq "DB Fan") {
if ($_.Status -eq "Normal") {
$bag.AddValue("Status","HEALTHY")
} elseif ($_.Status -eq "Serious") {
$bag.AddValue("Status","ERROR")
} else {
$bag.AddValue("Status","WARNING")
}
}
}
$api.LogScriptEvent("MonitorStorageDKUFan.ps1", 103, 0, "Finished getting storage DKU Fan health data for $resourceName")
} else {
$api.LogScriptEvent("MonitorStorageDKUFan.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>