A Unit Monitor runs a script to get PRIMERGY ESXiSeed Host Server Health
This health monitor runs a script on the Host Server to get the Host Server Health State.
Host Server Health State presents the health of the Fujitsu PRIMERGY ESXiSeed Host Server. This health state depends on presence of CIM Indications Listener service.
If this health monitor is in Warning state, the CIM Indications Listener service is not installed on target ESXiSeed Host Server.
View Alerts
Target | Fujitsu.Servers.PRIMERGY.ESXiSeed.HostServer |
Parent Monitor | System.Health.AvailabilityState |
Category | StateCollection |
Enabled | True |
Alert Generate | False |
Alert Auto Resolve | False |
Monitor Type | Fujitsu.Servers.PRIMERGY.ESXiSeed.Monitor.Type |
Remotable | True |
Accessibility | Public |
RunAs | Default |
<UnitMonitor ID="Fujitsu.Servers.PRIMERGY.ESXiSeed.HostServer.Monitor" Accessibility="Public" Enabled="true" Target="Fujitsu.Servers.PRIMERGY.ESXiSeed.HostServer" ParentMonitorID="SystemHealth!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="Fujitsu.Servers.PRIMERGY.ESXiSeed.Monitor.Type" ConfirmDelivery="false">
<Category>StateCollection</Category>
<OperationalStates>
<OperationalState ID="OK" MonitorTypeStateID="HealthSuccess" HealthState="Success"/>
<OperationalState ID="Degraded" MonitorTypeStateID="HealthWarning" HealthState="Warning"/>
<OperationalState ID="Error" MonitorTypeStateID="HealthError" HealthState="Error"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>480</IntervalSeconds>
<ScriptName>HostServerMonitor.ps1</ScriptName>
<ScriptBody>
#-------------------------------------------------------------------
# Fujitsu
# Copyright 2015-2019 FUJITSU LIMITED
#
# HostServerMonitor.ps1
#
# Summary:
# Monitors Fujitsu PRIMERGY ESXi Host Servers.
#
#-------------------------------------------------------------------
$script:RootRegistryKey = "HKLM:\SOFTWARE\Fujitsu\ServerView Suite\SCOM Integration\SVISCOM-ESXi"
$script:RegKeyCIMListener = "CIMIndicationsListener"
$script:ValueDeployStatus = "DeployStatus"
$StatusInstalled = "Installed"
function Main {
$status = Get-RegValue $ValueDeployStatus
$oAPI = New-Object -ComObject "MOM.ScriptAPI"
$oPropertyBag = $script:oAPI.CreateTypedPropertyBag(3)
if ($status -eq $StatusInstalled) {
$oPropertyBag.AddValue("HealthState", "OK")
$oPropertyBag.AddValue("Details", "CIM Indications Listener is installed")
} else {
$oPropertyBag.AddValue("HealthState", "Degraded")
$oPropertyBag.AddValue("Details", "CIM Indications Listener is *NOT* installed")
}
$oPropertyBag
}
function Get-RegValue {
param ( [string] $Name )
try {
return (Get-ItemProperty "$RootRegistryKey\$RegKeyCIMListener" -Name $Name -Ea Stop).$Name
} catch {
}
return $null
}
Main
</ScriptBody>
</Configuration>
</UnitMonitor>