Discovers the WAS Listener for WebSphere MQ service
Knowledge Base article:
Summary
The WAS Listener for WebSphere MQ discovery Queries the WMI namespace “root\cimv2” for the “Net.Mqs Listener Adapter”. If found, the Host Integration Server 2010 Management Pack creates an instance of the WASListenerWebSphereMQ class.
set oDiscoveryData = oAPI.CreateDiscoveryData(0, SourceId, ManagedEntityId)
' MSMQ-MQS Bridge Discovery
' Search for Net.Mqs Listener Adapter instance of root\cimv2\Win32_Service.
' If > 0, create the Net.Mqs Listener Adapter Service
Dim colWin32Services
Dim objWin32Service
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='Net.Mqs Listener Adapter'",, 0)
for each objWin32Service in colWin32Services
set oInst = oDiscoveryData.CreateClassInstance("$MPElement[Name='Microsoft.HostIntegrationServer.2010.WASListenerWebSphereMQ']$")
call oInst.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", TargetComputer)
call oInst.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", "WAS Listener for WebSphere MQ")
call oDiscoveryData.AddInstance(oInst)