The monitoring event

You can configure IBM® Integration Bus to emit a monitoring event (an XML document) when something interesting happens. Events are typically emitted to support transaction monitoring, transaction auditing, and business process monitoring. The event XML conforms to the monitoring event schema WMBEvent.xsd.

You can find the WMBEvent.xsd schema file in the WBMonitorEventsProject folder of the WebSphere® Business Monitor sample when you import it to your workspace. The WMBEvent.xsd file is also available in the default message catalog. To access the schema from the IBM Integration Toolkit, click File > New > Message Definition File From > IBM supplied message > IBM Integration Bus Monitoring Event.

Each event contains the following information:
  • Source of the event
  • Name of the event
  • Creation time and sequence number
  • Correlation ID for events emitted by the same transaction or unit of work
  • Details of the message flow
Tip: A terminal emits an event only if the message passes through that terminal. In particular, the output terminal of an output node emits events only if it is connected.

A monitoring event can also contain the following items:

  • Application data extracted from the message.
  • Part or all of the message bit stream. All nodes can produce bit streams, which can be included in monitoring events.
Use either the monitoring properties of a message flow or a monitoring profile configurable service to configure the following items:
  • Where an event is emitted from
  • The content of the event

Sequence number

To enable software that processes events, such as WebSphere Business Monitor, to sequence them correctly, both an ISO 8601 time stamp and a counter attribute are produced. The counter attribute is in the EventSequence element of the monitoring event. This counter starts at 1 for the first event produced by the processing of a message (normally the transaction.Start event) and is incremented for each subsequent event produced. It is reset to 1 at the start of the next message. The creation time and counter are always produced on all monitoring events. The software processing the events can choose which field, or a combination of the two, to use to sequence the events.

If a message is processed successfully, the monitoring events generated have a contiguous, incrementing set of counter values, starting at 1 and assigned at the time when the event is created. If a message fails and is rolled back, there might be gaps in the counter sequence. The missing values are those used for events that were produced as part of the message flow unit of work that was rolled back.

Monitoring events can be included in the main unit of work of a message flow, an independent unit of work, or outside of a unit of work. Consequently, if a message flow fails the sequence numbers are not guaranteed to be contiguous. For example consider the following scenario:
  • Sequence 1: the transaction start event.
  • Sequence 2, 3, 4: events in the message flow unit of work.
  • Sequence 5: the independent unit of work.
  • Sequence 6: an event outside of a unit of work.
  • Sequence 7: an event in the message flow unit of work.
  • Sequence 8: an event outside of a unit of work.
  • The flow then fails and is rolled back.
  • Sequence 9: the transaction rollback event in the independent unit of work.
Only sequence numbers 1, 5, 6, 8 and 9 are sent to the monitoring application.

Example event

<?xml version="1.0" encoding="UTF-8"?>
<wmb:event xmlns:wmb=http://www.ibm.com/xmlns/prod/websphere/messagebroker/6.1.0/monitoring/event>
   <wmb:eventPointData>
     <wmb:eventData wmb:eventSourceAddress="MQInput1.terminal.in"
                    wmb:eventSchemaVersion="6.1.0.3" wmb:productVersion="7000">
       <wmb:eventIdentity wmb:eventName="MQInput event"/>
       <wmb:eventSequence wmb:creationTime="2001-12-31T12:00:00+01:00" wmb:counter='2'/>
       <wmb:eventCorrelation wmb:localTransactionId="123"
                              wmb:parentTransactionId="456"
                              wmb:globalTransactionId="789"/>
     </wmb:eventData>
     <wmb:messageFlowData>
       <wmb:broker wmb:UUID="d53122ae-1c01-0000-0080-b1b02528c6bf"
                    wmb:name="myNode"/>
       <wmb:executionGroup wmb:UUID="d43122ae-1c01-0000-0080-b1b02528c6bf"
                            wmb:name="default"/>
       <wmb:messageFlow wmb:UUID="e6d224ae-1c01-0000-0080-9100cd1a61f7"
                         wmb:name="myMessageFlow" wmb:threadId="4201"
                         wmb:uniqueFlowName="myNode.default.myApplication.myMessageFlow"/>
       <wmb:node wmb:nodeLabel="MQInput1" wmb:nodeType="ComIbmMqInputNode"
                  wmb:terminal="in" wmb:detail="MYMESSAGEFLOW.IN"/>
     </wmb:messageFlowData>
   </wmb:eventPointData>
   <wmb:applicationData xmlns="">
     <wmb:simpleContent wmb:name="invoiceNo" wmb:targetNamespace=""
                         wmb:dataType="string" wmb:value="567"/>
     <wmb:complexContent wmb:elementName="customerName" wmb:targetNamespace="">
       <customerName>
         <firstName>Steve</firstName>
         <lastName>Bloggs</lastName>
       </customerName>
     </wmb:complexContent>
   </wmb:applicationData>
   <wmb:bitstreamData>
     <wmb:bitstream wmb:encoding="base64Binary">TUQgIAIAAAAAAAAACAAAAP////8AAAAAIgIAALUBAAAgICAgICAg
IAAAAAAAAAAAQU1RIFFNMSAgICAgICAgIHo640ggABsHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFFNMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC
Ag</wmb:bitstream>
   </wmb:bitstreamData>
</wmb:event> 

Default content of monitoring events

When an event is emitted, the fields in the event are created using the information provided by the monitoring properties of the message flow, or a monitoring profile configurable service if one has been applied to the message flow. Any event field that is not explicitly specified is given a default value as shown in the table.

Field in event Default Value
eventData/@wmb:eventSourceAddress No default; you must provide this information.
eventData/@wmb:eventSchemaVersion 6.1.0.3
eventData/@wmb:productVersion 7000
eventData/eventIdentity/@wmb:eventName The default is derived from @eventSourceAddress
eventData/eventSequence/@counter The counter is set to 1 for first event emitted and increased by 1 for each subsequent event.
eventData/eventSequence/@creationTime The date and time when the event was created.
eventData/eventCorrelation/@localTransactionId A generated unique identifier. This identifier will not be generated if only transaction rollback or end events, or both, are configured, unless a transaction start event is configured as well.
eventData/eventCorrelation/@parentTransactionId No default. Unless you set this value, an empty string is used.
eventData/eventCorrelation/@globalTransactionId No default. Unless you set this value, an empty string is used.
messageFlowData/broker/@name The name of the integration node.
messageFlowData/broker/@UUID The UUID of the integration node.
messageFlowData/executionGroup/@name The name of the integration server.
messageFlowData/executionGroup/@UUID The UUID of the integration server.
messageFlowData/messageFlow/@name The name of the message flow.
messageFlowData/messageFlow/@UUID The UUID of the message flow.
messageFlowData/messageFlow/@uniqueFlowName A string composed of the names of the integration node, integration server, application, and flow in the form: integrationNodeName.integrationServerName.application_name.flow_name
messageFlowData/messageFlow/@threadId The thread ID of the message flow. The format depends on the platform.
messageFlowData/node/@nodeLabel The label of the node that emitted the event.
messageFlowData/node/@nodeType The type of the node that emitted the event.
messageFlowData/node/@nodeDetail Optional information about the node.
MQInput
The name of the queue.
Other nodes
Omitted.
applicationData No default; omitted if not provided.
bitstreamData No default; omitted if not provided.

XPath queries that end in a wildcard

If an XPath query ends in a wildcard, each element node or attribute node appears in a separate complexContent or simpleContent folder in the emitted event.