+

Search Tips | Advanced Search

MFT monitor list message format

The XML messages that are published as retained publications to the topic string SYSTEM.FTE/monitors/agent_name/monitor_name conform to the MonitorList.xsd schema. Each XML message lists an active monitor belonging to that agent. This information is used by the fteListMonitors command and the IBM MQ Explorer plug-in to display a list of monitors to the user. The MonitorList.xsd schema document is located in the MQ_INSTALLATION_PATH/mqft/samples/schema directory. The MonitorList.xsd schema imports Monitor.xsd, which is in the same directory.


Schema

The following schema describes which elements are valid in a monitor list XML message.

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            targetNamespace="http://www.ibm.com/xmlns/wmqfte/7.0.1/MonitorDefinition"
            xmlns="http://www.ibm.com/xmlns/wmqfte/7.0.1/MonitorDefinition">

    <xsd:include schemaLocation="Monitor.xsd"/>

    <xsd:element name="monitorList">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="status"        type="monitorStatusType"          minOccurs="1" maxOccurs="1"/>
                <xsd:element name="configuration" type="monitorConfigurationType"   minOccurs="1" maxOccurs="1"/>
                <xsd:element name="pollInterval"  type="pollIntervalType"           minOccurs="1" maxOccurs="1"/>
                <xsd:element name="batch"         type="batchType"                  minOccurs="1" maxOccurs="1"/>
                <xsd:any minOccurs="0"/>
            </xsd:sequence>
            <xsd:attribute name="version" type="versionType" use="required"/>
            <xsd:attribute name="agent"   type="xsd:string"  use="required"/>
            <xsd:attribute name="monitor" type="xsd:string"  use="required"/>
        </xsd:complexType>
    </xsd:element>

    <xsd:complexType name="monitorStatusType">
        <xsd:sequence>
            <xsd:any minOccurs="0"/>
        </xsd:sequence>
        <xsd:attribute name="state"       type="xsd:token"/>
        <xsd:anyAttribute/>
    </xsd:complexType>

    <xsd:complexType name="monitorConfigurationType">
        <xsd:sequence>
            <xsd:element name="description"  type="xsd:string"           minOccurs="1" maxOccurs="1" />
            <xsd:element name="resources"    type="monitorResourcesType" minOccurs="0" maxOccurs="1" />
            <xsd:element name="triggerMatch" type="triggerMatchType"     minOccurs="0" maxOccurs="1" />
            <xsd:element name="tasks"        type="monitorListTasksType" minOccurs="0" maxOccurs="1" />
        </xsd:sequence>
        <xsd:anyAttribute/>
    </xsd:complexType>

    <xsd:complexType name="monitorListTasksType">
        <xsd:sequence>
            <xsd:element name="task" type="monitorListTaskType"         minOccurs="1" maxOccurs="1" />
        </xsd:sequence>
    </xsd:complexType>

    <xsd:complexType name="monitorListTaskType">
        <xsd:sequence>
            <xsd:element name="name"        type="monitorTaskNameType" 	minOccurs="0" maxOccurs="1" />
            <xsd:element name="description" type="xsd:string"          minOccurs="0" maxOccurs="1" />
            <xsd:element name="taskXML"     type="xsd:string"          minOccurs="0" maxOccurs="1" />
        </xsd:sequence>
    </xsd:complexType>

</xsd:schema>


Understanding the monitor list message

The elements and attributes used in the monitor list messages are described in the following list:

The following XML shows an example of a retained publication which is published to the topic string SYSTEM.FTE/monitors/agent_name/MONITORTWO when the monitor called MONITORTWO is created on AGENT_JUPITER. The escaped XML within the <taskXML> element describes the task that is submitted when the monitor condition is met.

<?xml version="1.0" encoding="UTF-8"?>
<lst:monitorList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                 xmlns:lst="http://www.ibm.com/xmlns/wmqfte/7.0.1/MonitorDefinition" 
                 xsi:schemaLocation="http://www.ibm.com/xmlns/wmqfte/7.0.1/MonitorDefinition MonitorList.xsd"
                 version="4.00" 
                 agent="AGENT_JUPITER" 
                 monitor="MONITORTWO">   
    <status state="started"/>   
    <configuration>
        <description/>
        <resources>
            <directory recursionLevel="0" id="">/srv/nfs/incoming</directory>
        </resources>
        <triggerMatch>
            <conditions>
                <condition>
                    <name/>
                    <resource id=""/>
                    <fileMatch>
                        <pattern>*.completed</pattern>
                    </fileMatch>
                </condition>
            </conditions>
        </triggerMatch>
        <tasks>
            <task>
                <name/>
                <description/>         
                <taskXML>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;request 
                         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="4.00" 
                         xsi:noNamespaceSchemaLocation="FileTransfer.xsd"&gt;&lt;managedTransfer&gt;
                         &lt;originator&gt;&lt;hostName&gt;example.com.&lt;/hostName&gt;
                         &lt;userID&gt;mqm&lt;/userID&gt;&lt;/originator&gt;
                         &lt;sourceAgent QMgr="QM_JUPITER" agent="AGENT_JUPITER"/&gt;
                         &lt;destinationAgent QMgr="QM_JUPITER" agent="AGENT_SATURN"/&gt;
                         &lt;transferSet&gt;&lt;item checksumMethod="MD5" mode="binary"&gt;
                         &lt;source disposition="leave" recursive="false"&gt;&lt;file
                         &gt;/srv/nfs/incoming/*.txt&lt;/file&gt;&lt;/source&gt;
                         &lt;destination exist="error" type="directory"&gt;
                         &lt;file&gt;/srv/backup&lt;/file&gt;&lt;/destination&gt;
                         &lt;/item&gt;&lt;/transferSet&gt;&lt;/managedTransfer&gt;
                         &lt;/request&gt;
                </taskXML>
            </task>
        </tasks>
    </configuration>
    <pollInterval units="minutes">1</pollInterval>
    <batch maxSize="1"/>
</lst:monitorList>