SET QUEUE

Use the SET QUEUE statement to specify the queues to be monitored.

Remember: The SET QUEUE statement does not affect on-demand attribute queries. Even if the agent does not sample data about particular types of queues, or the agent only infrequently samples definitional data for queues, you can still get the most current data for a queue by using an on-demand attribute group query.

Syntax

SET QUEUE NAME(queue-name-mask)
       MGRNAME(manager-name) | GROUP(group-name)
       [QDEFTYPE(PREDEFINED|PERMDYN|TEMPDYN|ALL)]
       [STATISTICS(YES|NO)]
       [STATUS(ADD|DELETE)]
       [QTYPE (ALL|QLOCAL|QALIAS|QCLUSTER|QREMOTE|QMODEL)]
       [DEFSAMPCYCLE(n-sample-interval)] 

Parameters

NAME(queue-name-mask)
Specifies a 1- through 48-character specific or generic name of the queues that you want to monitor. To specify a generic name, enter a character string followed by an asterisk (*). This parameter is required.

If you set this parameter to one blank character ( ), the IBM MQ Monitoring agent only collects sampled monitoring data for the dead-letter queue.

If you set this parameter to one asterisk character (*), the agent will collect sampled monitoring data for all queues that are applicable given other parameters to SET QUEUE.

MGRNAME(manager-name)
Associates this SET QUEUE statement with a queue manager that was defined on a previous SET MANAGER statement. You can use the name or nickname of the manager. The name must exactly match the name that is specified on the corresponding SET MANAGER command. This parameter is required if the GROUP parameter is not specified.
GROUP(group-name)
Associates this SET QUEUE statement with a group of queue managers that were defined on a previous SET GROUP statement. The name must exactly match the name that is specified on the corresponding SET GROUP statement. This parameter is required if the MGRNAME parameter is not specified.
QDEFTYPE(PREDEFINED|PERMDYN|TEMPDYN|ALL)
Indicates which types of queues to monitor. Specify any or all of the following definition types:
  • PREDEFINED: Monitor only predefined queues that match the specific or generic queue name. This is the default value.

    The default setting can avoid increasing the amount of queue data that is sampled and maintained for dynamic and temporary queues.

  • PERMDYN: Monitor only permanent dynamic queues that match the specific or generic queue name.
  • TEMPDYN: Monitor only temporary dynamic queues that match the specific or generic queue name.
  • ALL: Monitor all queues that match the specific or generic queue name.
Remember: This option does not affect workspaces that contain on-demand data. For example, the Real-time Queue Definitions and Real-time Queue Data workspaces display information that is related to all queues regardless of this attribute.
STATISTICS(YES|NO)
Specifies whether to collect queue statistics using IBM MQ Reset Queue Statistics command processing.

YES: Collect statistics using Reset Queue Statistics command processing for queues that match the specific or generic queue name.

NO: Do not collect statistics using Reset Queue Statistics command processing for queues that match the specific or generic queue name. This is the default value. See Collecting queue statistics data for a description of the Queue Statistics feature.

STATUS(ADD|DELETE)
Specifies what to do if this SET QUEUE command was previously specified with the same name.

If this parameter is omitted, the queue definition is added if it is a new name; it is modified if the same name was previously specified.

ADD: Creates a new queue definition. If this SET QUEUE command was previously specified with the same name, it is not modified and an error message is issued.

DELETE: Deletes a queue definition and all associated historical data.

QTYPE (ALL|QLOCAL|QALIAS|QCLUSTER|QREMOTE|QMODEL)
Specifies what types of queues to monitor. Specify any or all of the following queue types and use commas to separate specified values.
  • ALL: Monitor all types of queues. This is the default value.
  • QLOCAL: Monitor only the local queues.
  • QALIAS: Monitor only the alias queues.
  • QCLUSTER: Monitor only the cluster queues.
  • QREMOTE: Monitor only the remote queues.
  • QMODEL: Monitor only the model queues.
Remember: This parameter does not affect the workspaces that contain on-demand data. For example, the Real-time Queue Definitions and Real-time Queue Data workspaces display information about all queues regardless of this parameter value.
DEFSAMPCYCLE(n-sample-interval)

This parameter applies to z/OS® systems only.

Specifies how often the queue definition data is to be sampled. The specified number, n, indicates that agent collects queue definition data every n-th sample. The default value is 1, which indicates that agent collects data at every sample interval. The value 0 indicates that the agent collects the definitional data only at the first sample interval. After that, the definition data is refreshed only when the agent finds a new local queue.

Example

  • To monitor all queues managed by the MGRA queue manager , specify the following statement:
    SET QUEUE NAME(*) MGRNAME(MGRA) QDEFTYPE(ALL)
  • To monitor a predefined queue named ACCOUNTS, specify the following statement:
    SET QUEUE NAME(ACCOUNTS) MGRNAME(MGRA)
  • To monitor and collect statistics using Reset Queue Statistics command processing for all predefined queues managed by the MGRA queue manager, specify the following statement:
    SET QUEUE NAME(*) MGRNAME(MGRA) STATISTICS(YES)
  • To monitor permanent dynamic queues on the MGRA queue manager and whose names start with PAYR, specify the following statement:
    SET QUEUE NAME(PAYR*) MGRNAME(MGRA) QDEFTYPE(PERMDYN)
  • To monitor predefined and temporary dynamic queues on the MGRC queue manager and whose names start with MARCH, specify the following statement:
    SET QUEUE NAME(MARCH*) MGRNAME(MGRC) -
    QDEFTYPE(PREDEFINED,TEMPDYN)