MFT monitor request message examples

Examples of the messages that we can put on the agent command queue to request that the agent create or delete a monitor.


Create monitor request

<?xml version="1.0" encoding="UTF-8"?>
<monitor:monitor xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                 xmlns:monitor="http://www.ibm.com/xmlns/wmqfte/7.0.1/MonitorDefinition"  
                 version="4.00" 
                 xsi:schemaLocation="http://www.ibm.com/xmlns/wmqfte/7.0.1/MonitorDefinition ./Monitor.xsd">   
    <name>EXAMPLEMONITOR</name>   
    <pollInterval>1</pollInterval>   
    <agent>US2.BINDINGS.FILE</agent>   
    <resources>     
        <directory recursionLevel="0">/srv/nfs/incoming</directory>   
    </resources>   
    <triggerMatch>     
        <conditions>       
            <allOf>         
                <condition>           
                    <fileMatch>             
                        <pattern>*.completed</pattern>           
                    </fileMatch>         
                </condition>       
            </allOf>     
        </conditions>   
    </triggerMatch>  
    <reply QMGR="US2.BINDINGS">WMQFTE.4D400F8B20003702</reply>   
    <tasks>     
        <task>       
            <name/>       
            <transfer>         
                <request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                         version="4.00" 
                         xsi:noNamespaceSchemaLocation="FileTransfer.xsd">           
                    <managedTransfer>             
                        <originator>               
                            <hostName>example.com.</hostName>               
                            <userID>mqm</userID>             
                        </originator>             
                        <sourceAgent QMgr="US2.BINDINGS" agent="US2.BINDINGS.FILE"/>             
                        <destinationAgent QMgr="US2.BINDINGS" agent="US2.BINDINGS.FILE"/>             
                        <transferSet>               
                            <item checksumMethod="MD5" mode="binary">                 
                                <source disposition="leave" recursive="false">                   
                                    <file>/srv/nfs/incoming/*.txt</file>                 
                                </source>                 
                                <destination exist="error" type="directory">                   
                                    <file>/srv/backup</file>                 
                                </destination>               
                            </item>             
                        </transferSet>           
                    </managedTransfer>         
                </request>       
            </transfer>     
        </task>   
    </tasks>   
    <originator>     
        <hostName>example.com.</hostName>     
        <userID>mqm</userID>   
    </originator>
</monitor:monitor>


Delete monitor request

<?xml version="1.0" encoding="UTF-8"?>
<monitor:deleteMonitor xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
                       xmlns:monitor="http://www.ibm.com/xmlns/wmqfte/7.0.1/MonitorDefinition" 
                       version="4.00" 
                       xsi:schemaLocation="http://www.ibm.com/xmlns/wmqfte/7.0.1/MonitorDefinition ./Monitor.xsd">   
    <name>EXAMPLEMONITOR</name>   
    <originator>     
        <hostName>example.com.</hostName>     
        <userID>mqm</userID>   
    </originator>   
    <reply QMGR="QM_JUPITER">WMQFTE.4D400F8B20003705</reply>
</monitor:deleteMonitor>