Example: Configuring an MFT resource
We can specify an IBM MQ queue as the resource to be monitored by a resource monitor by using the -mq parameter with the fteCreateMonitor command.
In this example, the resource to be monitored is the queue MONITORED_QUEUE. This queue must be on the monitoring agent's queue manager, QM_NEPTUNE. The condition that the queue is monitored for is the presence of a complete group of messages. The task to be performed if the condition is satisfied is defined in the file task.xml.
Procedure
Type the following command:fteCreateMonitor -ma AGENT_NEPTUNE -mn myMonitor -mm QM_NEPTUNE -mq MONITORED_QUEUE -mt task.xml -tr completeGroups -pi 5 -pu minutes
The monitor checks the queue every five minutes to see if the condition completeGroups is true. If there are one or more complete groups on the queue, the monitor runs the task defined in the task.xml file once for each complete group.
What to do next
Do not create more than one resource monitor to monitor an individual queue. If you do then unpredictable behavior occurs. Parent topic: Monitor MFT resourcesRelated concepts
Related tasks
- Configure MFT monitor tasks to start commands and scripts
- Monitor a queue and using variable substitution
Related information