What to do when the Agent - MQ Connection Status metric value reported by the MQMonitor agent changes from Zero to One, and the associated type view changes between Red and Green, even though metrics are still being reported.
Both the MQMonitor Agent and Queue Manager are running constantly, but the Agent - MQ Connection Status metric fluctuates between Zero and One.
As documented, this metric indicates the connection status between the MQMonitor Agent and the Queue Manager.
The values are:
0 or green = successful
1 or red = unsuccessful
This metric can become unstable when there are permission issues. The diagnostic steps results should indicate where the permission issue resides.
There is a requirement to review the monitoring levels for different parts of MQ, the main areas are the manager itself, queue monitoring, and channel monitoring.
Monitoring is set at recommended levels for all components by default. The MQMonitor.properties file gives a list of metrics available for each monitoring level.
For example, these are default metrics for Queue Manager, taken from APM 9.7
# Default List of Recommended Metrics:
# Channel Name, Cluster Queue Manager Type, CLWL Channel Priority, CLWL Channel Rank, CLWL Channel Weight, Command Level, Default Transmission Queue, Description, Max Handles, Max Message Length, Maximum Outbound Cluster Channels, Maximum Uncommitted Messages, Performance Events, Platform, Queue Manager Name, Start And Stop Events,
The different monitoring levels are never, minimum, recommended and full.
Verify if you see the problem when monitoring at minimum level, by setting these permission levels:
<Queue Manager>@<Host>.monitor.manager = minimum
<Queue Manager>@<Host>.monitor.queue = minimum
<Queue Manager>@<Host>.monitor.channel = minimum
If still having the issue at the minimum level, set the level to never.
Review the required minimum permissions for the user running MQMonitor agent as documented in the guide.
Check the MQMonitor.properties file, based on the MQMonitor release on which metrics are included for which monitoring level. For example. Enqueue/Dequeue Count metrics normally require more elevated permission levels.
This is noted in MQMonitor.properties file, again taken from APM 9.7
# Note: To get enqueue count and dequeue count, the user need to have change permission on queues, as it is required for using 'Reset Queue Statistics'.
Enqueue/Dequeue count metrics had been included in minimum level monitoring but since APM 9.5.1, it is changed to the recommended level.
This is just one explanation why changing from recommended to minimum monitoring level can eliminate this problem.