IBM Support

MQ Monitoring agent: count for message statistics

Technical Blog Post


Abstract

MQ Monitoring agent: count for message statistics

Body

Generally speaking it's quite easy (there is an ad hoc workspace on TEP) to get message count statistics (eg messages put/read, etc) from the Queue level for both recent history and historical data coming from datawarehouse DB.
Anyway there are cases in which a customer may be interested to get the some message statistics at queue manager level and so the TEP view should show a sum of all the messages put/read in all queues in a specific queue manager.
MQ monitoring agent does not provide such a view out of the box and so you need to do a little hand work.

WHAT TO DO

However if you are collecting historical queue statistics in your TDW db and you are doing summarization of data (eg Daily), then you may simply create a custom SQL query against the TDW db and show the SUM_Messages_Put and SUM_Messages_Read in a TEP view for example.
To do this, you can create a new query selecting ODBC --> ITM Warehouse as Data Source and MQSERIES as Category:
image

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Then, in the Custom SQL panel use a proper SELECT statement like:

SELECT SUM("SUM_Messages_Put") AS MSGSPUT, SUM("SUM_Messages_Read") AS MSGSREAD FROM ITMUSER."Queue_Long_Term_History_D" WHERE "MQ_Manager_Name"='QM041031'

This will show the SUM of the Msgs Put/Read in each day (I have only 1 day as of now) for a specific queue manager.

image

Then you can create a TEP table view  

image

go into the Properties of the table view and "Click here to assign a query"...then assign the query you created above.

 

Additionally you may wonder if it's possible to utilize the time span to generate a report for hourly or daily or monthly and see the trend for example. Or generate daily volume from date X to date Y.
Basically it's possible and still quite simple by filtering the output of the SELECT statements above using a WHERE clause on
WRITETIME for the raw table
eg day July 25th:
SELECT SUM("Messages_Put") AS MSGSPUT, SUM("Messages_Read") AS MSGSREAD FROM ITMUSER."Queue_Long_Term_History" WHERE "MQ_Manager_Name"='QM041031' AND WRITETIME LIKE '1170725%'

or
Sample_Date_and_Time for the Daily/Hourly table
eg day July 25th:
SELECT SUM("SUM_Messages_Put") from ITMUSER."Queue_Long_Term_History_D" WHERE  "MQ_Manager_Name"='QM041031' AND "Sample_Date_and_Time" LIKE '1170725%'

Hope this helps
Walter

 

 

 

Tutorials Point

 

Subscribe and follow us for all the latest information directly on your social feeds:

 

 

image

 

image

 

image

 

 

  

Check out all our other posts and updates:

Academy Blogs:https://goo.gl/U7cYYY
Academy Videos:https://goo.gl/TLfMoF
Academy Google+:https://goo.gl/HnTs0w
Academy Twitter :https://goo.gl/AhR8CL


image

 

[{"Business Unit":{"code":"BU004","label":"Hybrid Cloud"},"Product":{"code":"","label":""},"Component":"","Platform":[{"code":"","label":""}],"Version":"","Edition":""}]

UID

ibm11085301