Checks Opt-Out registry keys
Checks for Display sessions assigned to the TN3270 service
Knowledge Base article:
Summary
The TN3270 Service discovery checks the registry location "HKLM\SOFTWARE\Microsoft\ SNA Server\CurrentVersion\Monitoring\" for the existence of the “Opt-Out” key DisableTN3270Monitoring. If the key exists, no further action is taken. If the key does not exist, the Host Integration Server 2013 Management Pack queries the WMI namespace “root\MicrosoftHIS”, looking for TN3270 sessions defined on the server. If any sessions are found, the Host Integration Server 2013 Management Pack creates an instance of the TN3270 class.
Case HIS_TN3_OPTOUT_KEY
bDisableTN3Monitoring = TRUE
'ScriptContext.Echo (strIndent2 & strValue)
Case HIS_TN5_OPTOUT_KEY
bDisableTN5Monitoring = TRUE
'ScriptContext.Echo (strIndent2 & strValue)
Case HIS_PRINT_OPTOUT_KEY
bDisablePrintMonitoring = TRUE
'ScriptContext.Echo (strIndent2 & strValue)
Case HIS_HIP_OPTOUT_KEY
bDisableHIPMonitoring = TRUE
'ScriptContext.Echo (strIndent2 & strValue)
Case HIS_LU62RESYNC_OPTOUT_KEY
bDisableLU62ResyncMonitoring = TRUE
'ScriptContext.Echo (strIndent2 & strValue)
Case HIS_SI_OPTOUT_KEY
bDisableSIMonitoring = TRUE
'ScriptContext.Echo (strIndent2 & strValue)
Case HIS_MI_OPTOUT_KEY
bDisableMIMonitoring = TRUE
'ScriptContext.Echo (strIndent2 & strValue)
Case HIS_DI_OPTOUT_KEY
bDisableDIMonitoring = TRUE
'ScriptContext.Echo (strIndent2 & strValue)
Case HIS_WIP_OPTOUT_KEY
bDisableWIPMonitoring = TRUE
'ScriptContext.Echo (strIndent2 & strValue)
End Select
next
end if
End Sub 'GetRegParams
Sub TN3270SvcsDiscovery()
' SNA Svcs discovery - TN3
' All state components within a role must be discovered within a single discovery data instance.
Dim colSessions
Dim colWin32Services
Dim objWin32Service
' TN3270 Discovery
' Get the set of TN3270 sessions for this HIS server, and if > 0 add the
' TN3 state monitoring component in the HIS Svcs role.
if NOT bDisableTN3Monitoring then
Set Service = Locator.ConnectServer(TargetComputer, "root\MicrosoftHIS")
' Get TN3270 session count
set colSessions = Service.ExecQuery("select * FROM MsSna_TN3270Session where Service='" & strNetbiosName & "'",, 0)
if NOT colSessions.Count = 0 then
intTN3Sessions = colSessions.Count
set oInst = oDiscoveryData.CreateClassInstance("$MPElement[Name='Microsoft.HostIntegrationServer.2013.TN3270']$")
call oInst.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", TargetComputer)
call oInst.AddProperty("$MPElement[Name='Microsoft.HostIntegrationServer.2013.TN3270']/TN3270Sessions$", intTN3Sessions)
call oInst.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", "TN3270")
call oDiscoveryData.AddInstance(oInst)
end if
end if
End Sub 'TN3270SvcsDiscovery </Script></ScriptBody>
<TimeoutSeconds>360</TimeoutSeconds>
</DataSource>
</Discovery>