The IP Resync discovery checks the registry location "HKLM\SOFTWARE\Microsoft\ SNA Server\CurrentVersion\Monitoring\" for the existence of the “Opt-Out” key DisableIPResyncMonitoring. If the key exists, no further action is taken. If the key does not exist, the Host Integration Server 2010 Management Pack queries the WMI namespace “root\cimv2” for the “HIS TCP/IP Resync Service” service. If the service is found, the Host Integration Server 2010 Management Pack creates an instance of the IPResync class.
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")
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 IPResyncSvcsDiscovery()
Dim colWin32Services
Dim objWin32Service
' =============================================================
' IP Resync Service Discovery
' Check for Win32 service names that match the IP Resync service name pattern.
' If present add the IPResync state component and set IP Resync attribute = number found.
if NOT bDisableIPResyncMonitoring then
Set Service = Locator.ConnectServer(TargetComputer, "root\cimv2")
set colWin32Services = Service.ExecQuery("select * from Win32_Service where DisplayName='HIS TCP/IP Resync Service'",, 0)
for each objWin32Service in colWin32Services
set oInst = oDiscoveryData.CreateClassInstance("$MPElement[Name='Microsoft.HostIntegrationServer.2010.IPResync']$")
call oInst.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", TargetComputer)
call oInst.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", "IP Resync")
call oDiscoveryData.AddInstance(oInst)
next
end if
End Sub 'IPResyncSvcsDiscovery </Script></ScriptBody>
<TimeoutSeconds>360</TimeoutSeconds>
</DataSource>
</Discovery>