Collecting and publishing data from the IBM MQ accounting and statistics messages
The collecting and publishing of the data is controlled by two extension preferences, ProcessMQAcctMessages and ProcessMQStatMessages. These preferences can be set at the extension default level, in which case the setting applies to all queue managers monitored by that agent. Either may also be set more specifically at the queue manager level.
Both preferences are disabled by default, to avoid an increase in the memory footprint of the agent, monitoring extension and topic server, for users that are not actually using the feature. When either or both of these preferences are enabled, more memory will be used by the agent, extension and topic server processes, for all queue managers monitored by the agent where the preference is enabled, regardless of whether or not MQ is producing the accounting and/or statistics messages. Because the amount of monitored attributes is doubled when these preferences are enabled, the memory required by the Topic Service may also need to be doubled in size.
The Accounting and Statistics tabs in the Monitor Console show the effective state of the preference for the object. If the preference is not enabled, the following visual elements will be displayed:
- The value displayed for the preference will be "Off" or "Pending Restart".
- The will be a grey rectangle visible under all the displayed attributes, indicating that the values are not being updated.
- The "stale data" symbol (large question mark) is overlaid on the view.
- Some text will be displayed at the top of the view, indicating why the values are not being updated, examples below.
- The preference ProcessMQAcctMessages is not currently enabled for the monitoring extension for IBM MQ on this agent or queue manager, these attributes will not be updated and may display stale data.
- The preference ProcessMQStatMessages is not currently enabled for the monitoring extension for IBM MQ on this agent or queue manager, these attributes will not be updated and may display stale data.
When the preference is changed to On, the monitoring extension will start looking for the MQ messages on the next sample interval, and will begin publishing data. If no accounting or statistics data messages were collected, then zeros will be published for the relevant values, as shown below.
When you change the preference for an active monitoring extension instance, on the next monitoring cycle, the extension will restart all of the monitoring sub-tasks, in order to immediately reduce the overall memory footprint.
To make it easier to detect this situation, the value attribute for the preference takes on the value "Pending Restart" (the numeric value is 1), until qpmon is fully restarted. Note that the qpmon extension has no way of knowing whether or not qpea has been fully restarted.
The topic service also has to be restarted in order to fully reduce the memory footprint, but this is only significant when disabling one or both of the preferences on a wide scale. One such scenario would be if you turned either or both of these preferences on via a policy for a large number of agents, and then decided to turn it back off.