Flow Monitoring using MQTT in IBM Integration Bus (IIB)

If you are using an integration node without an associated MQ queue manager, you can still achieve IIB business process monitoring feature using MQ Telemetry Transport (MQTT) protocol. Each IIB integration node has built-in support for MQTT. An external MQTT server can also be used. IIB event messages can be subscribed for:

  • Message flow performance

  • Resource performance

  • Configuration changes

  • State Changes

  • Workload management

  • Monitoring

This blog will cover how to achieve flow monitoring using MQTT.

Deploy an Application to an Integration Node with no Associated Queue Manager:

Configure Monitoring Events:

Make use of the enabled property of the mqsichangeproperties command to enable or disable the publication of event messages by the specified pub/sub broker:

C:\Program Files\IBM\IIB\10.0.0.9>mqsichangeproperties TESTNode_haider.raza -b pubsub -o BusinessEvents/MQTT -n enabled -v true
BIP8071I: Successful command completion.

Each IBM Integration Node Runs its MQTT Server on a Unique Port, Check the MQTT Server Port:

C:\Program Files\IBM\IIB\10.0.0.9>mqsireportproperties TESTNODE_haider.raza -b pubsub -o MQTTServer -a
MQTTServer
  enabled='true'
  port='11883'
BIP8071I: Successful command completion.

To change the port number, the MQTT broker must be stopped to change the port number. The following command is used to stop the MQTT broker,

 mqsichangeproperties IntegrationNodeName -b pubsub -o MQTTServer -n enabled -v false 

Then the port number of the MQTT broker can be changed using the following command,

mqsichangeproperties IntegrationNodeName -b pubsub -o MQTTServer -n enabled,port -v true,11884

To initiate monitoring for all message flows in all integration servers on Linux, UNIX, and Windows C:\Program Files\IBM\IIB\10.0.0.9>mqsichangeflowmonitoring TESTNode_haider.raza -c active -g -j BIP8071I: Successful command completion.

Use MQTT Client to Connect to the MQTT Server and Subscribe to the Topic of Interest:

IBM/IntegrationBus/your_integration_node_name/Monitoring/your_integration_server_name/your_flow_name

Or

IBM/IntegrationBus/your_integration_node_name/Monitoring/# (using wildcard)

Sample Flow Monitoring Event Published to MQTTServer:

<wmb:event xmlns:wmb="http://www.ibm.com/xmlns/prod/websphere/messagebroker/6.1.0/monitoring/event">
	<wmb:eventPointData>
		<wmb:eventData wmb:productVersion="10009" wmb:eventSchemaVersion="6.1.0.3" wmb:eventSourceAddress="File Input.transaction.End">
			<wmb:eventIdentity wmb:eventName="File Input.TransactionEnd"/>
			<wmb:eventSequence wmb:creationTime="2018-12-14T03:21:06.352741Z" wmb:counter="2"/>
			<wmb:eventCorrelation wmb:localTransactionId="124bc3b8-3b86-4bae-9547-d6592d3391de-1" wmb:parentTransactionId="" wmb:globalTransactionId=""/>
		</wmb:eventData>
		<wmb:messageFlowData>
			<wmb:broker wmb:name="TESTNODE_haider.raza" wmb:UUID="9cc8e42f-a2ca-4c95-98e1-65dd7064d7f7"/>
			<wmb:executionGroup wmb:name="default" wmb:UUID="91a39b68-768e-4354-8b76-19a8e719b369"/>
			<wmb:messageFlow wmb:uniqueFlowName="TESTNODE_haider.raza.default.testEvents.test" wmb:name="test" wmb:UUID="c8e10ff3-648f-4f72-967a-098c429aadda" wmb:threadId="33480"/>
			<wmb:node wmb:nodeLabel="File Input" wmb:nodeType="ComIbmFileInputNode"/>
		</wmb:messageFlowData>
	</wmb:eventPointData>
</wmb:event>