Aggiornamento 952247 dell'host Hyper-V per System Center 2012 Virtual Machine Manager

Microsoft.SystemCenter.VirtualMachineManager.2012.HyperVHostUpdate952247Monitor (UnitMonitor)

Consente di monitorare se l'aggiornamento 952247 dell'host Hyper-V per VMM è installato

Knowledge Base article:

Riepilogo

Aggiornamento 952247 non rilevato nell'host di virtualizzazione.

Cause

Aggiornamento 952247 non rilevato nell'host di virtualizzazione.

Soluzioni

Installare l'hotfix 952247 sull'host di virtualizzazione appropriato.

Altre informazioni

http://support.microsoft.com/kb/952247

Element properties:

TargetMicrosoft.SystemCenter.VirtualMachineManager.2012.HyperVHost
Parent MonitorMicrosoft.SystemCenter.VirtualMachineManager.2012.HyperVHostUpdatesRollup
CategoryAvailabilityHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.Windows.TimedScript.TwoStateMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
Aggiornamento 952247 di host Hyper-V non installato
L'aggiornamento 952247 dell'host Hyper-V per VMM è installato su {0}
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.SystemCenter.VirtualMachineManager.2012.HyperVHostUpdate952247Monitor" Accessibility="Public" Target="VMM2012Discovery!Microsoft.SystemCenter.VirtualMachineManager.2012.HyperVHost" ParentMonitorID="Microsoft.SystemCenter.VirtualMachineManager.2012.HyperVHostUpdatesRollup" Remotable="true" TypeID="Windows!Microsoft.Windows.TimedScript.TwoStateMonitorType">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Microsoft.SystemCenter.VirtualMachineManager.2012.HyperVHostUpdate952247Monitor.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</AlertParameter1>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="Update952247NotInstalled" MonitorTypeStateID="Error" HealthState="Error"/>
<OperationalState ID="Update952247Installed" MonitorTypeStateID="Success" HealthState="Success"/>
</OperationalStates>
<Configuration>
<IntervalSeconds>86400</IntervalSeconds>
<SyncTime/>
<ScriptName>Update952247MonitorScript.vbs</ScriptName>
<Arguments/>
<ScriptBody><Script>
' Copyright (c) Microsoft Corporation. All rights reserved.
' VBScript source code
' Update952247MonitorScript.vbs
Option Explicit

SetLocale("en-us")

' This Script is used to get the version of OS
' If the version is greater than "6.0.6001.22170",
' then it returns "Healthy", otherwise returns "Unhealthy"


Dim objFSO, actualVersion, oAPI, oBag
const expectedVersion = "6.0.6001.22170"

Dim shell, windowsdir
set shell = WScript.CreateObject("WScript.Shell")
windowsdir = shell.ExpandEnvironmentStrings("%windir%")

Set oAPI = CreateObject("MOM.ScriptAPI")
Set oBag = oAPI.CreatePropertyBag()

Set objFSO = CreateObject("Scripting.FileSystemObject")
Call oBag.AddValue("Expected Path", windowsdir&amp; "\Cluster")
Call oBag.AddValue("ExpectedFile", "clusres.dll")


' Check if the %Windir%\Cluster is present
if objFSO.FolderExists(windowsdir&amp; "\Cluster\") Then
Call oBag.AddValue("Expected Path Exists", "Yes")
' Check if the clusres.dll is present
if objFSO.FileExists(windowsdir&amp; "\Cluster\clusres.dll") Then
Call oBag.AddValue("Expected File Exists", "Yes")
' Get the version of %Windir%\Cluster\clusres.dll
actualVersion = objFSO.GetFileVersion(windowsdir&amp; "\Cluster\clusres.dll")
if actualVersion &lt; expectedVersion Then
Call oBag.AddValue("Update952247 Installed", "UnHealthy")
else
Call oBag.AddValue("Update952247 Installed", "Healthy")
End if
Call oBag.AddValue("ActualVersion", actualVersion)
Call oBag.AddValue("ExpectedVersion", expectedVersion)
Else
Call oBag.AddValue("Expected File Exists", "No")
Call oBag.AddValue("Update952247 Installed", "UnHealthy")
End If
Else
Call oBag.AddValue("Expected Path Exists", "No")
' If the %Windir%\Cluster is absent, since it is not a cluster node, set the monitor healthy
Call oBag.AddValue("Update952247 Installed", "Healthy")
End If
Call oAPI.Return(oBag)
</Script></ScriptBody>
<TimeoutSeconds>300</TimeoutSeconds>
<ErrorExpression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='Update952247 Installed']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">UnHealthy</Value>
</ValueExpression>
</SimpleExpression>
</ErrorExpression>
<SuccessExpression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">Property[@Name='Update952247 Installed']</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Healthy</Value>
</ValueExpression>
</SimpleExpression>
</SuccessExpression>
</Configuration>
</UnitMonitor>