Truesight Middleware and Transaction Monitor: How can I use TMTM Event automation to enable MQ Trigger on local queues

Version 2
    Share This:

    This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.


    TrueSight Middleware Monitor


    BMC Middleware and Transaction Management


    BMC Middleware Management Truesight Middleware and Transaction Monitor


    How can I use TMTM Event automation to enable MQ Trigger on local queues, if the Trigger Control on the queue is set to NOTRIGGER.


    We can make use of the Event Automation provided with TMTM to implement this. Please follow the below instructions.
    You'd need to prepare the TMTM environment first. Make sure to add the perl bin directory(provided in TMTM install directory) to the path variable.
    The perl version provided with TMTM is Perl 5 Version 26.

    Now you need to go to the 'automation' directory under TMTM install directory, and copy the following 2 files to '<Your_TMTM_Install_Dir>\perl\site\lib' directory.

    Now you just need to update the in row number 9 & 10.

    $QPasaCGW::HOSTNAME = 'localhost'; $QPasaCGW::PORT = $MQ_CLIENT_GATEWAY_PORT$;
    You should enter the TMTM server's hostname and client gateway service port number 15006  here (if not already present), and this line should look like this:  
    $QPasaCGW::HOSTNAME = TMTM_HostName; $QPasaCGW::PORT = 15006;
    Now in order to enable the trigger on the queue, you'd need to set up a TMTM event Trigger with Type as '  Websphere MQ Local Queues' and  check the '  TriggerControl' attribute in below pane. 
    You can compare it against a value of '0' which corresponds to NOTRIGGER. The value of '1' corresponds to TRIGGER. 
    After this commit the event trigger. Refer the snap below. 

    User-added image

    Once the event trigger has been created, you need to create a new TMTM Event Action Pipeline. 
    Create start and stop flags, and use '  Execute Program' node as highlighted in the snapshot below. 

    User-added image
    After this, double click on the node and the properties dialogue box will open. Here you'd need to specify what program and what event format script needs to be selected. 
    In the   Program field enter something like this: (my TMTM is on Windows, hence I use cmd prompt to execute the perl script provided with TMTM):  
    cmd.exe /C C:\BMC\TMTM\perl\bin\perl <Your_TMTM_Install_Dir>\automation\
    1. Please note, that we have given absolute path of the TMTM perl in the command. 
    2. If you have TMTM installed on Linux environment, please change it accordingly. Also check your TMTM_Install_Dir as per your environment. 
    Example for Linux (depends on your shell):  
    ksh <TMTM_install_dir>/perl/bin/perl /<Your_TMTM_Install_Dir>/automation/ComMqsoftwareAlterQueue.plorsh <TMTM_install_dir>/perl/bin/perl /<Your_TMTM_Install_Dir>/automation/
    In the   Arguments field, Right click and select the option of '  Insert Script'. A new dialogue box will open, scroll down in that, and select the '  ComMqsoftwareTriggerOn' script and select Ok. 

    After this the Argument field should have exactly this value:   
    After this commit the action pipeline. 

    Now the last step, you should now create an event template, and add the event trigger and action pipeline you just created to it. This is to be followed by associating the monitored queue you want this to be executed on. 

    Note: If you want you can further customize the event format script. All you need to do is right click on Arguments section, and click on New Script. 
    Then name it as per your wish and enter the following script. This custom script does not use the value parameter passed as an argument. And the overall automation would still work with this script.  
    # @QPASA_VARS is an array of hashes ([type], path, value)  # $QPASA_OUTPUT is the insertion string into the final formatted output  # %QPASA_EVENT is a hash containing the attributes of the event including # RuleName, ActionName, and TriggerName.  $topic =  @QPASA_VARS[0]->{path}; #$value =  @QPASA_VARS[0]->{value};  $QPASA_OUTPUT = join (" ", TriggerOn, $topic);
    On Similar lines you can create a setup for disabling the trigger on the queue by altering the Trigger Control to NoTrigger. You will just need to pass the argument TriggerOff instead of TriggerOn. The automation script would be same. And the available format script would be '  ComMqsoftwareTriggerOff'


    Article Number:


    Article Type:


      Looking for additional information?    Search BMC Support  or  Browse Knowledge Articles