bvstone

Setting Up Message Queue Monitoring with JOBWATCH

Posted:

Setting Up Message Queue Monitoring with JOBWATCH

BVSTools recently announced the release of Job Watch (JOBWATCH) v5.0 which allows you to monitor message queues and send alerts or run programs depending on the criteria set up for the monitor.  This feature requires V7R2 or higher.

To get started, use the JOBWATCHCF command to enter the Job Watch Configuration screen.  You are presented with the main Job Status Maintenance screen which allows you to set up monitors for when jobs enter a specific state (ie, MSGW).

Press the F7 function key and you will be taken to the Job Watch MSGQ Maintenance screen.  When the software is delivered there are sample configurations included (yet not active, active monitors are listed in yellow) that you are able to use as a template if you wish.  One calls a program and the other a command.   Sample programs are also included in source physical file member QRPGLESRC in the JOBWATCH library.

To create a new monitor, enter option 1 on the top blank line.  You can enter a message queue name, message type, message severity and start your command or you can leave all of these blank for now.  When you hit enter you will be taken to a screen where you can enter details for your specific monitor.

You also can use option 3 next to an existing monitor to copy that specific monitor and use it as a starting point.

On the details screen you are presented with all of the available options to use when setting up a message queue monitor as well as the command or program to run.  Most of these options are self-explanatory but let's focus on a couple of them that aren't:

  • Min Severity - This is the minimum severity to check  for on this specific monitor.  This value is inclusive, so if you which to check for messages with a severity of 50 or greater you would enter the value 50 here.  A value of 0 will check for all message severities.
  • Trim - This is a new option that was added in JOBWATCH v5.0 and higher that allows you to specify if you want the replacement data trimmed of blanks when it is used as a substitution value.  In the past the data was always trimmed which, once we added replacement variables that were larger than 32 bytes, caused issues.  When specifying *NO on the value the blanks will not be trimmed and this should keep the data intact.  We suggest using *NO when the replacement variable is used as a parameter on a CALL, and *YES when the value is used as a parameter on a command.  Also, when using a replacement value as a parameter on a CALL to a program, be sure to enclose the replacement value in single quotes.
  • Timestamp -  When JOBWATCH runs and finds any messages that match the criteria you set up, if the timestamp for the message is greater than this value, this timestamp specific to this monitor will be updated with that timestamp.  This is done so that you will not get the same alerts repeatedly.  This is an editable field so you can set it back to any time you want, if needed.  But most of the time when the monitor is originally set up this can be set to a specific date/time and left alone after that, allowing the system to update it.

All of the other options allow you to enter a specific value, or the special value of *ALL, including Message Type.  If you wish to monitor for multiple message types, but not all of them, the interface makes it easy to make one monitor for a specific message type and then copy it many times to set the message type to other message types you wish to monitor for.

When you are done and returned back to the message queue monitor screen, make sure that your new monitor is active.  If the MSGQ Name column is yellow, it is active.  Use option 5 next to a monitor to activate or deactivate it.

More information, including the available replacement values can be see in the JOBWATCH documentation.  And as always free free to contact us with any questions or issues.

 

 


Last edited 10/29/2017 at 07:26:58




Reply




© Copyright 1983-2024 BVSTools
GreenBoard(v3) Powered by the eRPG SDK, MAILTOOL Plus!, GreenTools for Google Apps, jQuery, jQuery UI, BlockUI, TinyMCE and running on the IBM i (AKA AS/400, iSeries, System i).