Some of the content described in this article is available in meshIQ Manage versions 11 and greater. See meshIQ Highlights v11 for an overview of feature changes.
Jump ahead: |
The data displayed is controlled by the schema selected from the Default schema drop-down located at the top right of the viewlet. This is the schema that was selected during your previous session and will remain in effect until you select a different schema.
To change your view, select a different schema from the Default schema dropdown. You can also create a new schema.
The management of statistics schemas is governed by the Manage Global Display Schemas and Manage Private Display Schemas rights. See Navigator GUI Feature Rights for details.
Create a new schema
- Choose the method you want to use to create a new schema.
- Edit the current one (please note that you cannot edit the Default Queue Status Query schema).
- or create a completely new schema .
When creating a new schema, it is recommended to make a copy of an existing schema and use that as a starting point (instead of overwriting an existing schema).
- After you make your selection, the Manage Statistics Schemas window opens. This is where you specify the query to determine the attributes displayed. The left side of the window displays the existing schemas.
- Select a schema to view its query on the right side of the window. The queries will have slight differences depending on the database you utilize.
See below for an explanation of the schema fields.
- SELECT statement: The attributes to display in the viewlet are specified within the SELECT statement. The Default Queue Status Query schema selects all attributes. You can change this by entering all desired attributes and separating them with a comma.
You can copy and paste attribute names from viewlet column headers right into the Select field of the query.
The column header names within the viewlet can be customized by using “as <ColumnTitle>” to change the column header names. Attributes containing numeric values can also be added together using +. As seen in the below examples, the put count fields were added together and display in one column titled “TOTALPUT.”
Adding Fields and Changing Display Names
Using Views
- FROM statement: Defines the table name.
- WHERE statement: contains query conditions. It can have defined or dynamic parameters. Dynamic parameter values are filled automatically according to the selected object. Possible dynamic parameters:
{WGS_NAME} – workgroup server name
{NODE_NAME} – node name
{QMGR_NAME} – queue manager name
{OBJ_NAME} – object name
{INTERVAL_START} – interval start time Unix timestamp
{INTERVAL_END} – interval end time Unix timestamp
- GROUP BY or LIMIT statement: defines the sorting and/or the limiting of the column values (limit of record rows), e.g., Group by MQNODE_NAME asc LIMIT 1000 (the definition depends on database vendor).
- Chart by field: specify a data field to display the results as a graph. See Viewing a Statistics Graph.
Getting Help (If you have no SQL experience)
As you can see, the Manage Statistics Schemas window is very advanced and requires knowledge of SQL. Ask your administrator for assistance. They can send you queries you can copy and paste into the Manage Statistics Schemas window.
An even easier method is to utilize Views. Views are queried tables saved in the database created by your administrator. Multiple views can be created. The View name will need to be specified within the FROM statement, as seen below. The WHERE statement remains the same.
Example of MySQL Query
Two queues from different nodes (MQM/NODE1/T1/LQ1) and (MQM/NODE2/T2/LQ2) were selected. The local time specified in the statistics viewlet gets converted to a Unix timestamp:
start time (2019-08-21 10:00 AM) 1566370800,
end time (2019-08-21 11:15 PM) 1566418500
The following schema was used for the queue:
Actual query:
SELECT * FROM statqueue WHERE
(
MANAGER_NAME = 'MQM' AND MQNODE_NAME = 'NODE1' AND MQMGR_NAME = 'T1' AND QUEUE_NAME = 'LQ1' AND STAT_TIME_STAMP >= 1566370800 AND STAT_TIME_STAMP <= 1566418500
)
OR
(
MANAGER_NAME = 'MQM' AND MQNODE_NAME = 'NODE2' AND MQMGR_NAME = 'T2' AND QUEUE_NAME = 'LQ2' AND STAT_TIME_STAMP >= 1566370800 AND STAT_TIME_STAMP <= 1566418500
)
LIMIT 1000
Queries are run using the 'nastel_apwmq' database.
The schemas are very flexible and different queries can be run. This includes queries not related to MQ statistics. The syntax is dependent on your SQL database (i.e., queries for the MySQL database can be different from the Postgre database).
Viewing a Statistics Graph
Statistics viewlets can be displayed as a graph by specifying the data field within the Chart by field. For example, to view message backout count (messages withdrawn from a queue due to transaction problems), enter the data field name, BACKOUT_COUNT within Chart by.
Your viewlet will now display as a graph, displaying the dynamics of the backed out messages during the specified time period.