Discovers HIP Services
The HIP discovery checks the following registry locations to verify that the feature is configured:
HKLM\SOFTWARE\Microsoft\Host Integration Server\ConfigFramework\ConfiguredFeatures\COMTI
HKLM\SOFTWARE\Microsoft\Host Integration Server\ConfigFramework\ConfiguredFeatures\SESSION_INTEGRATOR
If either of these locations are found, the Host Integration Server 2010 Management Pack creates an instance of the AppInt class.
Target | Microsoft.HostIntegrationServer.2010.AppInt |
Enabled | True |
Frequency | 43200 |
Remotable | False |
Discovered Classes and their attribuets: |
---|
|
ID | Module Type | TypeId | RunAs |
---|---|---|---|
DS | DataSource | Microsoft.Windows.TimedScript.DiscoveryProvider | Default |
<Discovery ID="Microsoft.HostIntegrationServer.2010.HIPDiscovery" Enabled="true" Target="Microsoft.HostIntegrationServer.2010.AppInt" ConfirmDelivery="false" Remotable="true" Priority="Normal">
<Category>Discovery</Category>
<DiscoveryTypes>
<DiscoveryClass TypeID="Microsoft.HostIntegrationServer.2010.HIP">
<Property TypeID="System!System.Entity" PropertyID="DisplayName"/>
<Property TypeID="Microsoft.HostIntegrationServer.2010.HIP" PropertyID="HIPApplicationName"/>
</DiscoveryClass>
</DiscoveryTypes>
<DataSource ID="DS" TypeID="Windows!Microsoft.Windows.TimedScript.DiscoveryProvider">
<IntervalSeconds>43200</IntervalSeconds>
<SyncTime/>
<ScriptName>HIS2010 HIP Discovery.vbs</ScriptName>
<Arguments>$MPElement$ $Target/Id$ $Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Arguments>
<ScriptBody>
'--------------------------------------------------------------------------------------------------
' <name>HIS2010 HIP Discovery.vbs</name>
' <company>Microsoft Corporation</company>
' <copyright>Copyright (c) Microsoft Corporation 2010</copyright>
' <summary>
' Microsoft Host Integration Server 2010 HIP discovery script for use with SCOM 2007.
' Provides discovery functions for Host Integration Server 2010 HIP.
' </summary>
'
' See Management Pack Guide for details on parameters and usage
'--------------------------------------------------------------------------------------------------
SetLocale("en-us")
Dim oAPI, oDiscoveryData, oInst
Set oAPI = CreateObject("MOM.ScriptAPI")
Dim oArgs
Set oArgs = WScript.Arguments
if oArgs.Count < 3 Then
Wscript.Quit -1
End If
Dim SourceID, ManagedEntityId, TargetComputer
SourceId = oArgs(0)
ManagedEntityId = oArgs(1)
TargetComputer = oArgs(2)
set oDiscoveryData = oAPI.CreateDiscoveryData(0, SourceId, ManagedEntityId)
Dim bDisableTN3Monitoring, bDisableTN5Monitoring, bDisablePrintMonitoring, bDisableHIPMonitoring, bDisableLU62ResyncMonitoring, bDisableIPResyncMonitoring
Dim bDisableSIMonitoring, bDisableMIMonitoring, bDisableDIMonitoring, bDisableWIPMonitoring
bDisableTN3Monitoring = FALSE
bDisableTN5Monitoring = FALSE
bDisablePrintMonitoring = FALSE
bDisableHIPMonitoring = FALSE
bDisableLU62ResyncMonitoring = FALSE
bDisableIPResyncMonitoring = FALSE
bDisableSIMonitoring = FALSE
bDisableMIMonitoring = FALSE
bDisableDIMonitoring = FALSE
bDisableWIPMonitoring = FALSE
GetRegParams()
HIPDiscovery()
call oAPI.Return(oDiscoveryData)
Sub GetRegParams()
' Performs all registry lookups required for service discovery.
Const WMI_REG_HKLM = &H80000002
Const HIS_OPTOUT_KEYPATH = "SOFTWARE\Microsoft\SNA Server\CurrentVersion\Monitoring\"
Const HIS_TN3_OPTOUT_KEY = "DisableTN3270Monitoring"
Const HIS_TN5_OPTOUT_KEY = "DisableTN5250Monitoring"
Const HIS_PRINT_OPTOUT_KEY = "DisablePrintMonitoring"
Const HIS_HIP_OPTOUT_KEY = "DisableHIPMonitoring"
Const HIS_LU62RESYNC_OPTOUT_KEY = "DisableLU62ResyncMonitoring"
Const HIS_IPRESYNC_OPTOUT_KEY = "DisableIPResyncMonitoring"
Const HIS_SI_OPTOUT_KEY = "DisableSessionIntegratorMonitoring"
Const HIS_DI_OPTOUT_KEY = "DisableDataIntegrationMonitoring"
Const HIS_MI_OPTOUT_KEY = "DisableMessageIntegrationMonitoring"
Const HIS_WIP_OPTOUT_KEY = "DisableWIPMonitoring"
Const HIS_SNA_CONFIG_KEYPATH = "SOFTWARE\Microsoft\Host Integration Server\ConfigFramework\ConfiguredFeatures"
Const HIS_SNA_SERVICE_KEY = "SNA_SERVICE"
Const HIS_SNA_APPLICATION_SUPPORT_KEY = "SNA_APPLICATION_SUPPORT"
Dim oRegProvider
Dim intReturn
Dim colValues, strValue
Dim colTypes
' =============================================================
' Check for the possible set of monitoring opt-out keys, and for each that exists
' set the corresponding boolean variable to TRUE
Set oRegProvider = GetObject("winmgmts:\\" & TargetComputer & "\root\default:StdRegProv")
intReturn = oRegProvider.EnumValues(WMI_REG_HKLM, HIS_OPTOUT_KEYPATH, colValues, colTypes)
If intReturn = 0 And Not (IsNull(colValues)) Then
For Each strValue In colValues
Select Case strValue
Case HIS_TN3_OPTOUT_KEY
bDisableTN3Monitoring = True
Case HIS_TN5_OPTOUT_KEY
bDisableTN5Monitoring = True
Case HIS_PRINT_OPTOUT_KEY
bDisablePrintMonitoring = True
Case HIS_HIP_OPTOUT_KEY
bDisableHIPMonitoring = True
Case HIS_LU62RESYNC_OPTOUT_KEY
bDisableLU62ResyncMonitoring = True
Case HIS_IPRESYNC_OPTOUT_KEY
bDisableIPResyncMonitoring = True
Case HIS_SI_OPTOUT_KEY
bDisableSIMonitoring = True
Case HIS_MI_OPTOUT_KEY
bDisableMIMonitoring = True
Case HIS_DI_OPTOUT_KEY
bDisableDIMonitoring = True
Case HIS_WIP_OPTOUT_KEY
bDisableWIPMonitoring = True
End Select
Next
End If
End Sub 'GetRegParams
Sub HIPDiscovery()
' HIP Discovery
' Pattern match instances of root\cimv2\Win32_Service that start with "HIPService:".
' If > 0, create the HIS HIP role and add Service, Listeners, and APP state components
' for each instance.
Dim colWin32Services
Dim objWin32Service
if NOT bDisableHIPMonitoring then
Dim Locator, Service
Set Locator = CreateObject("WbemScripting.SWbemLocator")
Set Service = Locator.ConnectServer(TargetComputer, "root\cimv2")
set colWin32Services = Service.ExecQuery("select * from Win32_Service where DisplayName like '%HIPService%'",,48)
for each objWin32Service in colWin32Services
set oInst = oDiscoveryData.CreateClassInstance("$MPElement[Name='Microsoft.HostIntegrationServer.2010.HIP']$")
call oInst.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", TargetComputer)
call oInst.AddProperty("$MPElement[Name='Microsoft.HostIntegrationServer.2010.HIP']/HIPApplicationName$", objWin32Service.Name)
call oInst.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", objWin32Service.Name)
call oDiscoveryData.AddInstance(oInst)
next
end if
End Sub 'HIPDiscovery
</ScriptBody>
<TimeoutSeconds>360</TimeoutSeconds>
</DataSource>
</Discovery>