We have the long term issue that many of the MQ metrics (e.g. ibmmq_qmgr_log_,,,) of our native HA setups are only available for some hours, then disappear, and then appear again (we raised Support Cases for this already many month ago but support was declined as metrics are somehow provided as-is). On dev environments, where we often perform rollouts, depending on which pod is the active one, the data is missing and when we perform a failover to another pod, it then appears again. We checked "curl http://localhost:9157/metrics" and the metrics returned already have just been a subset. Now, looking at the go code, I assume that there is an error within CollectQueueManagerStatus() that is not logged and stops further gathering.
if GetPlatform() == ibmmq.MQPL_ZOS {
err = collectQueueManagerAttrsZOS()
} else {
err = collectQueueManagerAttrsDist()
if err == nil {
err = collectQueueManagerListeners()
}
if err == nil {
err = collectQueueManagerServices()
}
if err == nil {
err = collectQueueManagerStatus(ibmmq.MQOT_Q_MGR)
}
}
Is there a way to enable tracing of metric collection for a qmgr so we can see the output of
traceExitErr("CollectQueueManagerStatus", 0, err)
?
The copied code is from https://github.com/ibm-messaging/mq-golang/blob/master/mqmetric/qmgr.go