diff --git a/CHANGELOG.md b/CHANGELOG.md index d11d58e..624c2f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Changelog Newest updates are at the top of this file. +## Jun 18 2024 - v5.6.0 +- Update for MQ 9.4.0 + ## Feb 29 2024 - v5.5.4 - Update for MQ 9.3.5 - ibmmq - Add simple tracing for MQI calls (MQIGO_TRACE env var) diff --git a/Dockerfile b/Dockerfile index 2d20224..f24601f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -ARG BASE_IMAGE=ubuntu:18.04 +ARG BASE_IMAGE=ubuntu:20.04 FROM $BASE_IMAGE ARG GOPATH_ARG="/go" @@ -60,7 +60,7 @@ RUN mkdir -p $GOPATH/src $GOPATH/bin $GOPATH/pkg \ # Location of the downloadable MQ client package \ ENV RDURL="https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist" \ RDTAR="IBM-MQC-Redist-Linux${MQARCH}.tar.gz" \ - VRMF=9.3.5.0 + VRMF=9.4.0.0 # Install the MQ client from the Redistributable package. This also contains the # header files we need to compile against. Setup the subset of the package diff --git a/ibmmq/cmqc_aix.go b/ibmmq/cmqc_aix.go index 8f73a8a..563264a 100644 --- a/ibmmq/cmqc_aix.go +++ b/ibmmq/cmqc_aix.go @@ -30,8 +30,8 @@ package ibmmq **************************************************************** * * -* Generated on: 2/1/24 12:04 PM -* Build Level: p935-L240201 +* Generated on: 6/5/24 2:30 PM +* Build Level: p940-L240605.1 * Build Type: Production * */ @@ -1032,7 +1032,7 @@ const ( MQCMDI_SEC_SIGNOFF_ERROR int32 = 17 MQCMDI_SEC_TIMER_ZERO int32 = 14 MQCMDI_SEC_UPPERCASE int32 = 21 - MQCMDL_CURRENT_LEVEL int32 = 935 + MQCMDL_CURRENT_LEVEL int32 = 940 MQCMDL_LEVEL_1 int32 = 100 MQCMDL_LEVEL_101 int32 = 101 MQCMDL_LEVEL_110 int32 = 110 @@ -1085,6 +1085,7 @@ const ( MQCMDL_LEVEL_933 int32 = 933 MQCMDL_LEVEL_934 int32 = 934 MQCMDL_LEVEL_935 int32 = 935 + MQCMDL_LEVEL_940 int32 = 940 MQCMD_ACCOUNTING_MQI int32 = 167 MQCMD_ACCOUNTING_Q int32 = 168 MQCMD_ACTIVITY_MSG int32 = 69 @@ -1338,6 +1339,8 @@ const ( MQCNO_VERSION_8 int32 = 8 MQCODL_AS_INPUT int32 = -1 MQCOMPRESS_ANY int32 = 268435455 + MQCOMPRESS_LZ4FAST int32 = 16 + MQCOMPRESS_LZ4HIGH int32 = 32 MQCOMPRESS_NONE int32 = 0 MQCOMPRESS_NOT_AVAILABLE int32 = -1 MQCOMPRESS_RLE int32 = 1 @@ -1862,7 +1865,7 @@ const ( MQIACF_INVALID_DEST_COUNT int32 = 1371 MQIACF_ITEM_COUNT int32 = 1378 MQIACF_KNOWN_DEST_COUNT int32 = 1369 - MQIACF_LAST_USED int32 = 1465 + MQIACF_LAST_USED int32 = 1466 MQIACF_LDAP_CONNECTION_STATUS int32 = 1409 MQIACF_LISTENER_ATTRS int32 = 1222 MQIACF_LISTENER_STATUS_ATTRS int32 = 1223 @@ -2078,6 +2081,7 @@ const ( MQIACF_SYSP_UNIT_STATUS int32 = 1215 MQIACF_SYSP_WLM_INTERVAL int32 = 1202 MQIACF_SYSP_WLM_INT_UNITS int32 = 1268 + MQIACF_SYSP_ZHYPERLINK int32 = 1466 MQIACF_SYSP_ZHYPERWRITE int32 = 1414 MQIACF_SYSTEM_OBJECTS int32 = 1404 MQIACF_THREAD_ID int32 = 1025 @@ -3411,6 +3415,7 @@ const ( MQRCCF_HB_INTERVAL_WRONG_TYPE int32 = 4078 MQRCCF_HOBJ_ERROR int32 = 3315 MQRCCF_HOST_NOT_AVAILABLE int32 = 4010 + MQRCCF_INCOMPATIBLE_QM_IN_QSG int32 = 3389 MQRCCF_INCORRECT_Q int32 = 3079 MQRCCF_INCORRECT_STREAM int32 = 3075 MQRCCF_INDOUBT_VALUE_ERROR int32 = 3053 @@ -4973,6 +4978,7 @@ const ( MQ_CERT_LABEL_LENGTH int32 = 64 MQ_CERT_VAL_POLICY_ANY int32 = 0 MQ_CERT_VAL_POLICY_DEFAULT int32 = 0 + MQ_CERT_VAL_POLICY_NONE int32 = 2 MQ_CERT_VAL_POLICY_RFC5280 int32 = 1 MQ_CF_LEID_LENGTH int32 = 12 MQ_CF_STRUC_DESC_LENGTH int32 = 64 diff --git a/ibmmq/cmqc_darwin.go b/ibmmq/cmqc_darwin.go index dffd0d5..b080cc3 100644 --- a/ibmmq/cmqc_darwin.go +++ b/ibmmq/cmqc_darwin.go @@ -30,8 +30,8 @@ package ibmmq **************************************************************** * * -* Generated on: 2/1/24 12:04 PM -* Build Level: p935-L240201 +* Generated on: 6/5/24 2:30 PM +* Build Level: p940-L240605.1 * Build Type: Production * */ @@ -1032,7 +1032,7 @@ const ( MQCMDI_SEC_SIGNOFF_ERROR int32 = 17 MQCMDI_SEC_TIMER_ZERO int32 = 14 MQCMDI_SEC_UPPERCASE int32 = 21 - MQCMDL_CURRENT_LEVEL int32 = 935 + MQCMDL_CURRENT_LEVEL int32 = 940 MQCMDL_LEVEL_1 int32 = 100 MQCMDL_LEVEL_101 int32 = 101 MQCMDL_LEVEL_110 int32 = 110 @@ -1085,6 +1085,7 @@ const ( MQCMDL_LEVEL_933 int32 = 933 MQCMDL_LEVEL_934 int32 = 934 MQCMDL_LEVEL_935 int32 = 935 + MQCMDL_LEVEL_940 int32 = 940 MQCMD_ACCOUNTING_MQI int32 = 167 MQCMD_ACCOUNTING_Q int32 = 168 MQCMD_ACTIVITY_MSG int32 = 69 @@ -1338,6 +1339,8 @@ const ( MQCNO_VERSION_8 int32 = 8 MQCODL_AS_INPUT int32 = -1 MQCOMPRESS_ANY int32 = 268435455 + MQCOMPRESS_LZ4FAST int32 = 16 + MQCOMPRESS_LZ4HIGH int32 = 32 MQCOMPRESS_NONE int32 = 0 MQCOMPRESS_NOT_AVAILABLE int32 = -1 MQCOMPRESS_RLE int32 = 1 @@ -1862,7 +1865,7 @@ const ( MQIACF_INVALID_DEST_COUNT int32 = 1371 MQIACF_ITEM_COUNT int32 = 1378 MQIACF_KNOWN_DEST_COUNT int32 = 1369 - MQIACF_LAST_USED int32 = 1465 + MQIACF_LAST_USED int32 = 1466 MQIACF_LDAP_CONNECTION_STATUS int32 = 1409 MQIACF_LISTENER_ATTRS int32 = 1222 MQIACF_LISTENER_STATUS_ATTRS int32 = 1223 @@ -2078,6 +2081,7 @@ const ( MQIACF_SYSP_UNIT_STATUS int32 = 1215 MQIACF_SYSP_WLM_INTERVAL int32 = 1202 MQIACF_SYSP_WLM_INT_UNITS int32 = 1268 + MQIACF_SYSP_ZHYPERLINK int32 = 1466 MQIACF_SYSP_ZHYPERWRITE int32 = 1414 MQIACF_SYSTEM_OBJECTS int32 = 1404 MQIACF_THREAD_ID int32 = 1025 @@ -3411,6 +3415,7 @@ const ( MQRCCF_HB_INTERVAL_WRONG_TYPE int32 = 4078 MQRCCF_HOBJ_ERROR int32 = 3315 MQRCCF_HOST_NOT_AVAILABLE int32 = 4010 + MQRCCF_INCOMPATIBLE_QM_IN_QSG int32 = 3389 MQRCCF_INCORRECT_Q int32 = 3079 MQRCCF_INCORRECT_STREAM int32 = 3075 MQRCCF_INDOUBT_VALUE_ERROR int32 = 3053 @@ -4973,6 +4978,7 @@ const ( MQ_CERT_LABEL_LENGTH int32 = 64 MQ_CERT_VAL_POLICY_ANY int32 = 0 MQ_CERT_VAL_POLICY_DEFAULT int32 = 0 + MQ_CERT_VAL_POLICY_NONE int32 = 2 MQ_CERT_VAL_POLICY_RFC5280 int32 = 1 MQ_CF_LEID_LENGTH int32 = 12 MQ_CF_STRUC_DESC_LENGTH int32 = 64 diff --git a/ibmmq/cmqc_linux_amd64.go b/ibmmq/cmqc_linux_amd64.go index 373d2b9..a0e41a6 100644 --- a/ibmmq/cmqc_linux_amd64.go +++ b/ibmmq/cmqc_linux_amd64.go @@ -30,8 +30,8 @@ package ibmmq **************************************************************** * * -* Generated on: 2/1/24 12:04 PM -* Build Level: p935-L240201 +* Generated on: 6/5/24 2:30 PM +* Build Level: p940-L240605.1 * Build Type: Production * */ @@ -1032,7 +1032,7 @@ const ( MQCMDI_SEC_SIGNOFF_ERROR int32 = 17 MQCMDI_SEC_TIMER_ZERO int32 = 14 MQCMDI_SEC_UPPERCASE int32 = 21 - MQCMDL_CURRENT_LEVEL int32 = 935 + MQCMDL_CURRENT_LEVEL int32 = 940 MQCMDL_LEVEL_1 int32 = 100 MQCMDL_LEVEL_101 int32 = 101 MQCMDL_LEVEL_110 int32 = 110 @@ -1085,6 +1085,7 @@ const ( MQCMDL_LEVEL_933 int32 = 933 MQCMDL_LEVEL_934 int32 = 934 MQCMDL_LEVEL_935 int32 = 935 + MQCMDL_LEVEL_940 int32 = 940 MQCMD_ACCOUNTING_MQI int32 = 167 MQCMD_ACCOUNTING_Q int32 = 168 MQCMD_ACTIVITY_MSG int32 = 69 @@ -1338,6 +1339,8 @@ const ( MQCNO_VERSION_8 int32 = 8 MQCODL_AS_INPUT int32 = -1 MQCOMPRESS_ANY int32 = 268435455 + MQCOMPRESS_LZ4FAST int32 = 16 + MQCOMPRESS_LZ4HIGH int32 = 32 MQCOMPRESS_NONE int32 = 0 MQCOMPRESS_NOT_AVAILABLE int32 = -1 MQCOMPRESS_RLE int32 = 1 @@ -1862,7 +1865,7 @@ const ( MQIACF_INVALID_DEST_COUNT int32 = 1371 MQIACF_ITEM_COUNT int32 = 1378 MQIACF_KNOWN_DEST_COUNT int32 = 1369 - MQIACF_LAST_USED int32 = 1465 + MQIACF_LAST_USED int32 = 1466 MQIACF_LDAP_CONNECTION_STATUS int32 = 1409 MQIACF_LISTENER_ATTRS int32 = 1222 MQIACF_LISTENER_STATUS_ATTRS int32 = 1223 @@ -2078,6 +2081,7 @@ const ( MQIACF_SYSP_UNIT_STATUS int32 = 1215 MQIACF_SYSP_WLM_INTERVAL int32 = 1202 MQIACF_SYSP_WLM_INT_UNITS int32 = 1268 + MQIACF_SYSP_ZHYPERLINK int32 = 1466 MQIACF_SYSP_ZHYPERWRITE int32 = 1414 MQIACF_SYSTEM_OBJECTS int32 = 1404 MQIACF_THREAD_ID int32 = 1025 @@ -3411,6 +3415,7 @@ const ( MQRCCF_HB_INTERVAL_WRONG_TYPE int32 = 4078 MQRCCF_HOBJ_ERROR int32 = 3315 MQRCCF_HOST_NOT_AVAILABLE int32 = 4010 + MQRCCF_INCOMPATIBLE_QM_IN_QSG int32 = 3389 MQRCCF_INCORRECT_Q int32 = 3079 MQRCCF_INCORRECT_STREAM int32 = 3075 MQRCCF_INDOUBT_VALUE_ERROR int32 = 3053 @@ -4973,6 +4978,7 @@ const ( MQ_CERT_LABEL_LENGTH int32 = 64 MQ_CERT_VAL_POLICY_ANY int32 = 0 MQ_CERT_VAL_POLICY_DEFAULT int32 = 0 + MQ_CERT_VAL_POLICY_NONE int32 = 2 MQ_CERT_VAL_POLICY_RFC5280 int32 = 1 MQ_CF_LEID_LENGTH int32 = 12 MQ_CF_STRUC_DESC_LENGTH int32 = 64 diff --git a/ibmmq/cmqc_linux_arm64.go b/ibmmq/cmqc_linux_arm64.go index 3f0824e..5d0fe4f 100644 --- a/ibmmq/cmqc_linux_arm64.go +++ b/ibmmq/cmqc_linux_arm64.go @@ -30,8 +30,8 @@ package ibmmq **************************************************************** * * -* Generated on: 2/1/24 12:04 PM -* Build Level: p935-L240201 +* Generated on: 6/5/24 2:30 PM +* Build Level: p940-L240605.1 * Build Type: Production * */ @@ -1032,7 +1032,7 @@ const ( MQCMDI_SEC_SIGNOFF_ERROR int32 = 17 MQCMDI_SEC_TIMER_ZERO int32 = 14 MQCMDI_SEC_UPPERCASE int32 = 21 - MQCMDL_CURRENT_LEVEL int32 = 935 + MQCMDL_CURRENT_LEVEL int32 = 940 MQCMDL_LEVEL_1 int32 = 100 MQCMDL_LEVEL_101 int32 = 101 MQCMDL_LEVEL_110 int32 = 110 @@ -1085,6 +1085,7 @@ const ( MQCMDL_LEVEL_933 int32 = 933 MQCMDL_LEVEL_934 int32 = 934 MQCMDL_LEVEL_935 int32 = 935 + MQCMDL_LEVEL_940 int32 = 940 MQCMD_ACCOUNTING_MQI int32 = 167 MQCMD_ACCOUNTING_Q int32 = 168 MQCMD_ACTIVITY_MSG int32 = 69 @@ -1338,6 +1339,8 @@ const ( MQCNO_VERSION_8 int32 = 8 MQCODL_AS_INPUT int32 = -1 MQCOMPRESS_ANY int32 = 268435455 + MQCOMPRESS_LZ4FAST int32 = 16 + MQCOMPRESS_LZ4HIGH int32 = 32 MQCOMPRESS_NONE int32 = 0 MQCOMPRESS_NOT_AVAILABLE int32 = -1 MQCOMPRESS_RLE int32 = 1 @@ -1862,7 +1865,7 @@ const ( MQIACF_INVALID_DEST_COUNT int32 = 1371 MQIACF_ITEM_COUNT int32 = 1378 MQIACF_KNOWN_DEST_COUNT int32 = 1369 - MQIACF_LAST_USED int32 = 1465 + MQIACF_LAST_USED int32 = 1466 MQIACF_LDAP_CONNECTION_STATUS int32 = 1409 MQIACF_LISTENER_ATTRS int32 = 1222 MQIACF_LISTENER_STATUS_ATTRS int32 = 1223 @@ -2078,6 +2081,7 @@ const ( MQIACF_SYSP_UNIT_STATUS int32 = 1215 MQIACF_SYSP_WLM_INTERVAL int32 = 1202 MQIACF_SYSP_WLM_INT_UNITS int32 = 1268 + MQIACF_SYSP_ZHYPERLINK int32 = 1466 MQIACF_SYSP_ZHYPERWRITE int32 = 1414 MQIACF_SYSTEM_OBJECTS int32 = 1404 MQIACF_THREAD_ID int32 = 1025 @@ -3411,6 +3415,7 @@ const ( MQRCCF_HB_INTERVAL_WRONG_TYPE int32 = 4078 MQRCCF_HOBJ_ERROR int32 = 3315 MQRCCF_HOST_NOT_AVAILABLE int32 = 4010 + MQRCCF_INCOMPATIBLE_QM_IN_QSG int32 = 3389 MQRCCF_INCORRECT_Q int32 = 3079 MQRCCF_INCORRECT_STREAM int32 = 3075 MQRCCF_INDOUBT_VALUE_ERROR int32 = 3053 @@ -4973,6 +4978,7 @@ const ( MQ_CERT_LABEL_LENGTH int32 = 64 MQ_CERT_VAL_POLICY_ANY int32 = 0 MQ_CERT_VAL_POLICY_DEFAULT int32 = 0 + MQ_CERT_VAL_POLICY_NONE int32 = 2 MQ_CERT_VAL_POLICY_RFC5280 int32 = 1 MQ_CF_LEID_LENGTH int32 = 12 MQ_CF_STRUC_DESC_LENGTH int32 = 64 diff --git a/ibmmq/cmqc_linux_ppc64le.go b/ibmmq/cmqc_linux_ppc64le.go index 3e1ad4b..6d980a5 100644 --- a/ibmmq/cmqc_linux_ppc64le.go +++ b/ibmmq/cmqc_linux_ppc64le.go @@ -30,8 +30,8 @@ package ibmmq **************************************************************** * * -* Generated on: 2/1/24 12:04 PM -* Build Level: p935-L240201 +* Generated on: 6/5/24 2:30 PM +* Build Level: p940-L240605.1 * Build Type: Production * */ @@ -1032,7 +1032,7 @@ const ( MQCMDI_SEC_SIGNOFF_ERROR int32 = 17 MQCMDI_SEC_TIMER_ZERO int32 = 14 MQCMDI_SEC_UPPERCASE int32 = 21 - MQCMDL_CURRENT_LEVEL int32 = 935 + MQCMDL_CURRENT_LEVEL int32 = 940 MQCMDL_LEVEL_1 int32 = 100 MQCMDL_LEVEL_101 int32 = 101 MQCMDL_LEVEL_110 int32 = 110 @@ -1085,6 +1085,7 @@ const ( MQCMDL_LEVEL_933 int32 = 933 MQCMDL_LEVEL_934 int32 = 934 MQCMDL_LEVEL_935 int32 = 935 + MQCMDL_LEVEL_940 int32 = 940 MQCMD_ACCOUNTING_MQI int32 = 167 MQCMD_ACCOUNTING_Q int32 = 168 MQCMD_ACTIVITY_MSG int32 = 69 @@ -1338,6 +1339,8 @@ const ( MQCNO_VERSION_8 int32 = 8 MQCODL_AS_INPUT int32 = -1 MQCOMPRESS_ANY int32 = 268435455 + MQCOMPRESS_LZ4FAST int32 = 16 + MQCOMPRESS_LZ4HIGH int32 = 32 MQCOMPRESS_NONE int32 = 0 MQCOMPRESS_NOT_AVAILABLE int32 = -1 MQCOMPRESS_RLE int32 = 1 @@ -1862,7 +1865,7 @@ const ( MQIACF_INVALID_DEST_COUNT int32 = 1371 MQIACF_ITEM_COUNT int32 = 1378 MQIACF_KNOWN_DEST_COUNT int32 = 1369 - MQIACF_LAST_USED int32 = 1465 + MQIACF_LAST_USED int32 = 1466 MQIACF_LDAP_CONNECTION_STATUS int32 = 1409 MQIACF_LISTENER_ATTRS int32 = 1222 MQIACF_LISTENER_STATUS_ATTRS int32 = 1223 @@ -2078,6 +2081,7 @@ const ( MQIACF_SYSP_UNIT_STATUS int32 = 1215 MQIACF_SYSP_WLM_INTERVAL int32 = 1202 MQIACF_SYSP_WLM_INT_UNITS int32 = 1268 + MQIACF_SYSP_ZHYPERLINK int32 = 1466 MQIACF_SYSP_ZHYPERWRITE int32 = 1414 MQIACF_SYSTEM_OBJECTS int32 = 1404 MQIACF_THREAD_ID int32 = 1025 @@ -3411,6 +3415,7 @@ const ( MQRCCF_HB_INTERVAL_WRONG_TYPE int32 = 4078 MQRCCF_HOBJ_ERROR int32 = 3315 MQRCCF_HOST_NOT_AVAILABLE int32 = 4010 + MQRCCF_INCOMPATIBLE_QM_IN_QSG int32 = 3389 MQRCCF_INCORRECT_Q int32 = 3079 MQRCCF_INCORRECT_STREAM int32 = 3075 MQRCCF_INDOUBT_VALUE_ERROR int32 = 3053 @@ -4973,6 +4978,7 @@ const ( MQ_CERT_LABEL_LENGTH int32 = 64 MQ_CERT_VAL_POLICY_ANY int32 = 0 MQ_CERT_VAL_POLICY_DEFAULT int32 = 0 + MQ_CERT_VAL_POLICY_NONE int32 = 2 MQ_CERT_VAL_POLICY_RFC5280 int32 = 1 MQ_CF_LEID_LENGTH int32 = 12 MQ_CF_STRUC_DESC_LENGTH int32 = 64 diff --git a/ibmmq/cmqc_linux_s390x.go b/ibmmq/cmqc_linux_s390x.go index a96f347..addf3b7 100644 --- a/ibmmq/cmqc_linux_s390x.go +++ b/ibmmq/cmqc_linux_s390x.go @@ -30,8 +30,8 @@ package ibmmq **************************************************************** * * -* Generated on: 2/1/24 12:04 PM -* Build Level: p935-L240201 +* Generated on: 6/5/24 2:30 PM +* Build Level: p940-L240605.1 * Build Type: Production * */ @@ -1032,7 +1032,7 @@ const ( MQCMDI_SEC_SIGNOFF_ERROR int32 = 17 MQCMDI_SEC_TIMER_ZERO int32 = 14 MQCMDI_SEC_UPPERCASE int32 = 21 - MQCMDL_CURRENT_LEVEL int32 = 935 + MQCMDL_CURRENT_LEVEL int32 = 940 MQCMDL_LEVEL_1 int32 = 100 MQCMDL_LEVEL_101 int32 = 101 MQCMDL_LEVEL_110 int32 = 110 @@ -1085,6 +1085,7 @@ const ( MQCMDL_LEVEL_933 int32 = 933 MQCMDL_LEVEL_934 int32 = 934 MQCMDL_LEVEL_935 int32 = 935 + MQCMDL_LEVEL_940 int32 = 940 MQCMD_ACCOUNTING_MQI int32 = 167 MQCMD_ACCOUNTING_Q int32 = 168 MQCMD_ACTIVITY_MSG int32 = 69 @@ -1338,6 +1339,8 @@ const ( MQCNO_VERSION_8 int32 = 8 MQCODL_AS_INPUT int32 = -1 MQCOMPRESS_ANY int32 = 268435455 + MQCOMPRESS_LZ4FAST int32 = 16 + MQCOMPRESS_LZ4HIGH int32 = 32 MQCOMPRESS_NONE int32 = 0 MQCOMPRESS_NOT_AVAILABLE int32 = -1 MQCOMPRESS_RLE int32 = 1 @@ -1862,7 +1865,7 @@ const ( MQIACF_INVALID_DEST_COUNT int32 = 1371 MQIACF_ITEM_COUNT int32 = 1378 MQIACF_KNOWN_DEST_COUNT int32 = 1369 - MQIACF_LAST_USED int32 = 1465 + MQIACF_LAST_USED int32 = 1466 MQIACF_LDAP_CONNECTION_STATUS int32 = 1409 MQIACF_LISTENER_ATTRS int32 = 1222 MQIACF_LISTENER_STATUS_ATTRS int32 = 1223 @@ -2078,6 +2081,7 @@ const ( MQIACF_SYSP_UNIT_STATUS int32 = 1215 MQIACF_SYSP_WLM_INTERVAL int32 = 1202 MQIACF_SYSP_WLM_INT_UNITS int32 = 1268 + MQIACF_SYSP_ZHYPERLINK int32 = 1466 MQIACF_SYSP_ZHYPERWRITE int32 = 1414 MQIACF_SYSTEM_OBJECTS int32 = 1404 MQIACF_THREAD_ID int32 = 1025 @@ -3411,6 +3415,7 @@ const ( MQRCCF_HB_INTERVAL_WRONG_TYPE int32 = 4078 MQRCCF_HOBJ_ERROR int32 = 3315 MQRCCF_HOST_NOT_AVAILABLE int32 = 4010 + MQRCCF_INCOMPATIBLE_QM_IN_QSG int32 = 3389 MQRCCF_INCORRECT_Q int32 = 3079 MQRCCF_INCORRECT_STREAM int32 = 3075 MQRCCF_INDOUBT_VALUE_ERROR int32 = 3053 @@ -4973,6 +4978,7 @@ const ( MQ_CERT_LABEL_LENGTH int32 = 64 MQ_CERT_VAL_POLICY_ANY int32 = 0 MQ_CERT_VAL_POLICY_DEFAULT int32 = 0 + MQ_CERT_VAL_POLICY_NONE int32 = 2 MQ_CERT_VAL_POLICY_RFC5280 int32 = 1 MQ_CF_LEID_LENGTH int32 = 12 MQ_CF_STRUC_DESC_LENGTH int32 = 64 diff --git a/ibmmq/cmqc_windows.go b/ibmmq/cmqc_windows.go index 5301050..ff1528d 100644 --- a/ibmmq/cmqc_windows.go +++ b/ibmmq/cmqc_windows.go @@ -30,8 +30,8 @@ package ibmmq **************************************************************** * * -* Generated on: 2/1/24 12:04 PM -* Build Level: p935-L240201 +* Generated on: 6/5/24 2:30 PM +* Build Level: p940-L240605.1 * Build Type: Production * */ @@ -1032,7 +1032,7 @@ const ( MQCMDI_SEC_SIGNOFF_ERROR int32 = 17 MQCMDI_SEC_TIMER_ZERO int32 = 14 MQCMDI_SEC_UPPERCASE int32 = 21 - MQCMDL_CURRENT_LEVEL int32 = 935 + MQCMDL_CURRENT_LEVEL int32 = 940 MQCMDL_LEVEL_1 int32 = 100 MQCMDL_LEVEL_101 int32 = 101 MQCMDL_LEVEL_110 int32 = 110 @@ -1085,6 +1085,7 @@ const ( MQCMDL_LEVEL_933 int32 = 933 MQCMDL_LEVEL_934 int32 = 934 MQCMDL_LEVEL_935 int32 = 935 + MQCMDL_LEVEL_940 int32 = 940 MQCMD_ACCOUNTING_MQI int32 = 167 MQCMD_ACCOUNTING_Q int32 = 168 MQCMD_ACTIVITY_MSG int32 = 69 @@ -1338,6 +1339,8 @@ const ( MQCNO_VERSION_8 int32 = 8 MQCODL_AS_INPUT int32 = -1 MQCOMPRESS_ANY int32 = 268435455 + MQCOMPRESS_LZ4FAST int32 = 16 + MQCOMPRESS_LZ4HIGH int32 = 32 MQCOMPRESS_NONE int32 = 0 MQCOMPRESS_NOT_AVAILABLE int32 = -1 MQCOMPRESS_RLE int32 = 1 @@ -1862,7 +1865,7 @@ const ( MQIACF_INVALID_DEST_COUNT int32 = 1371 MQIACF_ITEM_COUNT int32 = 1378 MQIACF_KNOWN_DEST_COUNT int32 = 1369 - MQIACF_LAST_USED int32 = 1465 + MQIACF_LAST_USED int32 = 1466 MQIACF_LDAP_CONNECTION_STATUS int32 = 1409 MQIACF_LISTENER_ATTRS int32 = 1222 MQIACF_LISTENER_STATUS_ATTRS int32 = 1223 @@ -2078,6 +2081,7 @@ const ( MQIACF_SYSP_UNIT_STATUS int32 = 1215 MQIACF_SYSP_WLM_INTERVAL int32 = 1202 MQIACF_SYSP_WLM_INT_UNITS int32 = 1268 + MQIACF_SYSP_ZHYPERLINK int32 = 1466 MQIACF_SYSP_ZHYPERWRITE int32 = 1414 MQIACF_SYSTEM_OBJECTS int32 = 1404 MQIACF_THREAD_ID int32 = 1025 @@ -3411,6 +3415,7 @@ const ( MQRCCF_HB_INTERVAL_WRONG_TYPE int32 = 4078 MQRCCF_HOBJ_ERROR int32 = 3315 MQRCCF_HOST_NOT_AVAILABLE int32 = 4010 + MQRCCF_INCOMPATIBLE_QM_IN_QSG int32 = 3389 MQRCCF_INCORRECT_Q int32 = 3079 MQRCCF_INCORRECT_STREAM int32 = 3075 MQRCCF_INDOUBT_VALUE_ERROR int32 = 3053 @@ -4973,6 +4978,7 @@ const ( MQ_CERT_LABEL_LENGTH int32 = 64 MQ_CERT_VAL_POLICY_ANY int32 = 0 MQ_CERT_VAL_POLICY_DEFAULT int32 = 0 + MQ_CERT_VAL_POLICY_NONE int32 = 2 MQ_CERT_VAL_POLICY_RFC5280 int32 = 1 MQ_CF_LEID_LENGTH int32 = 12 MQ_CF_STRUC_DESC_LENGTH int32 = 64 diff --git a/ibmmq/mqistr.go b/ibmmq/mqistr.go index 1d0d431..ecaba5a 100644 --- a/ibmmq/mqistr.go +++ b/ibmmq/mqistr.go @@ -1463,6 +1463,8 @@ func MQItoString(class string, value int) string { s = "MQCMDL_LEVEL_934" case 935: s = "MQCMDL_LEVEL_935" + case 940: + s = "MQCMDL_LEVEL_940" default: s = "" } @@ -1561,6 +1563,10 @@ func MQItoString(class string, value int) string { s = "MQCOMPRESS_ZLIBHIGH" case 8: s = "MQCOMPRESS_SYSTEM" + case 16: + s = "MQCOMPRESS_LZ4FAST" + case 32: + s = "MQCOMPRESS_LZ4HIGH" case 268435455: s = "MQCOMPRESS_ANY" default: @@ -5731,6 +5737,8 @@ func MQItoString(class string, value int) string { s = "MQ_CERT_VAL_POLICY_ANY" case 1: s = "MQ_CERT_VAL_POLICY_RFC5280" + case 2: + s = "MQ_CERT_VAL_POLICY_NONE" default: s = "" } diff --git a/mqmetric/discover.go b/mqmetric/discover.go index 065f2fa..7e5a442 100644 --- a/mqmetric/discover.go +++ b/mqmetric/discover.go @@ -93,6 +93,7 @@ type ObjInfo struct { // These are used for queue information AttrMaxDepth int64 // The queue attribute value. Not the max depth reported by RESET QSTATS AttrUsage int64 // Normal or XMITQ + DefType int64 // Predefined or temp/perm dynamic queue Cluster string // The name of a single cluster in which the queue is shared (CLUSTERNL not supported here) // Some channel information AttrMaxInst int64 @@ -162,7 +163,7 @@ func VerifyConfig() (int32, error) { if err == nil { selectors := []int32{ibmmq.MQIA_MAX_Q_DEPTH, ibmmq.MQIA_DEFINITION_TYPE} - v, err = ci.si.replyQObj.InqMap(selectors) + v, err = ci.si.replyQObj.Inq(selectors) if err == nil { maxQDepth := v[ibmmq.MQIA_MAX_Q_DEPTH].(int32) // Function has tuning based on number of queues to be monitored @@ -1534,7 +1535,7 @@ func GetObjectDescription(key string, objectType int32) string { if !ok || strings.TrimSpace(o.Description) == "" { // return something so Prometheus doesn't turn it into "0.0" - return "-" + return DUMMY_STRING } else { return o.Description } diff --git a/mqmetric/mapping.go b/mqmetric/mapping.go index 7ab29bf..651140e 100644 --- a/mqmetric/mapping.go +++ b/mqmetric/mapping.go @@ -43,34 +43,322 @@ import ( ) var ( - mHeur = make(map[string]string) - mManual = make(map[string]string) + UseManualMetricMaps = false // May move to a config option at some point +) - mapsFilled = false +// These are the original heuristically-derived metric names. This was built from running +// the code once and capturing info from traces. Any new metrics should show up from tools run +// during the release process. +var mHeur = map[string]string{ + "user_cpu_time_percentage": "user_cpu_time_percentage", + "system_cpu_time_percentage": "system_cpu_time_percentage", + "cpu_load_-_one_minute_average": "cpu_load_one_minute_average_percentage", + "cpu_load_-_five_minute_average": "cpu_load_five_minute_average_percentage", + "cpu_load_-_fifteen_minute_average": "cpu_load_fifteen_minute_average_percentage", + "ram_free_percentage": "ram_free_percentage", + "ram_total_bytes": "ram_total_bytes", + "user_cpu_time_-_percentage_estimate_for_queue_manager": "user_cpu_time_estimate_for_queue_manager_percentage", + "system_cpu_time_-_percentage_estimate_for_queue_manager": "system_cpu_time_estimate_for_queue_manager_percentage", + "ram_total_bytes_-_estimate_for_queue_manager": "ram_total_estimate_for_queue_manager_bytes", - UseManualMetricMaps = false // May move to a config option at some point + // Class: Disk + "mq_trace_file_system_-_bytes_in_use": "mq_trace_file_system_in_use_bytes", + "mq_trace_file_system_-_free_space": "mq_trace_file_system_free_space_percentage", + "mq_errors_file_system_-_bytes_in_use": "mq_errors_file_system_in_use_bytes", + "mq_errors_file_system_-_free_space": "mq_errors_file_system_free_space_percentage", + "mq_fdc_file_count": "mq_fdc_file_count", + "queue_manager_file_system_-_bytes_in_use": "queue_manager_file_system_in_use_bytes", + "queue_manager_file_system_-_free_space": "queue_manager_file_system_free_space_percentage", + "log_-_bytes_in_use": "log_in_use_bytes", + "log_-_bytes_max": "log_max_bytes", + "log_file_system_-_bytes_in_use": "log_file_system_in_use_bytes", + "log_file_system_-_bytes_max": "log_file_system_max_bytes", + "log_-_physical_bytes_written": "log_physical_written_bytes", + "log_-_logical_bytes_written": "log_logical_written_bytes", + "log_-_write_latency": "log_write_latency_seconds", + "log_-_current_primary_space_in_use": "log_current_primary_space_in_use_percentage", + "log_-_workload_primary_space_utilization": "log_workload_primary_space_utilization_percentage", + "log_-_bytes_required_for_media_recovery": "log_required_for_media_recovery_bytes", + "log_-_bytes_occupied_by_reusable_extents": "log_occupied_by_reusable_extents_bytes", + "log_-_bytes_occupied_by_extents_waiting_to_be_archived": "log_occupied_by_extents_waiting_to_be_archived_bytes", + "log_-_write_size": "log_write_size_bytes", + + // Still class disk, but specifically for the appliance + "appliance_data_-_bytes_in_use": "appliance_data_in_use_bytes", + "appliance_data_-_free_space": "appliance_data_free_space_percentage", + "system_volume_-_bytes_in_use": "system_volume_in_use_bytes", + "system_volume_-_free_space": "system_volume_free_space_percentage", -) + // Class: STATQ and STATMQI + "mqinq_count": "mqinq_count", + "failed_mqinq_count": "failed_mqinq_count", + "mqset_count": "mqset_count", + "failed_mqset_count": "failed_mqset_count", + "interval_total_mqput/mqput1_count": "interval_mqput_mqput1_total_count", + "interval_total_mqput/mqput1_byte_count": "interval_mqput_mqput1_total_bytes", + "non-persistent_message_mqput_count": "non_persistent_message_mqput_count", + "persistent_message_mqput_count": "persistent_message_mqput_count", + "failed_mqput_count": "failed_mqput_count", + "non-persistent_message_mqput1_count": "non_persistent_message_mqput1_count", + "persistent_message_mqput1_count": "persistent_message_mqput1_count", + "failed_mqput1_count": "failed_mqput1_count", + "put_non-persistent_messages_-_byte_count": "put_non_persistent_messages_bytes", + "put_persistent_messages_-_byte_count": "put_persistent_messages_bytes", + "mqstat_count": "mqstat_count", + "interval_total_destructive_get-_count": "interval_destructive_get_total_count", + "interval_total_destructive_get_-_byte_count": "interval_destructive_get_total_bytes", + "non-persistent_message_destructive_get_-_count": "non_persistent_message_destructive_get_count", + "persistent_message_destructive_get_-_count": "persistent_message_destructive_get_count", + "failed_mqget_-_count": "failed_mqget_count", + "got_non-persistent_messages_-_byte_count": "got_non_persistent_messages_bytes", + "got_persistent_messages_-_byte_count": "got_persistent_messages_bytes", + "non-persistent_message_browse_-_count": "non_persistent_message_browse_count", + "persistent_message_browse_-_count": "persistent_message_browse_count", + "failed_browse_count": "failed_browse_count", + "non-persistent_message_browse_-_byte_count": "non_persistent_message_browse_bytes", + "persistent_message_browse_-_byte_count": "persistent_message_browse_bytes", + "expired_message_count": "expired_message_count", + "purged_queue_count": "purged_queue_count", + "mqcb_count": "mqcb_count", + "failed_mqcb_count": "failed_mqcb_count", + "mqctl_count": "mqctl_count", + "commit_count": "commit_count", + "rollback_count": "rollback_count", + "create_durable_subscription_count": "create_durable_subscription_count", + "alter_durable_subscription_count": "alter_durable_subscription_count", + "resume_durable_subscription_count": "resume_durable_subscription_count", + "create_non-durable_subscription_count": "create_non_durable_subscription_count", + "failed_create/alter/resume_subscription_count": "failed_create_alter_resume_subscription_count", + "delete_durable_subscription_count": "delete_durable_subscription_count", + "delete_non-durable_subscription_count": "delete_non_durable_subscription_count", + "subscription_delete_failure_count": "subscription_delete_failure_count", + "mqsubrq_count": "mqsubrq_count", + "failed_mqsubrq_count": "failed_mqsubrq_count", + "durable_subscriber_-_high_water_mark": "durable_subscriber_high_water_mark", + "durable_subscriber_-_low_water_mark": "durable_subscriber_low_water_mark", + "non-durable_subscriber_-_high_water_mark": "non_durable_subscriber_high_water_mark", + "non-durable_subscriber_-_low_water_mark": "non_durable_subscriber_low_water_mark", + "topic_mqput/mqput1_interval_total": "topic_mqput_mqput1_interval_total", + "interval_total_topic_bytes_put": "interval_topic_put_total", + "published_to_subscribers_-_message_count": "published_to_subscribers_message_count", + "published_to_subscribers_-_byte_count": "published_to_subscribers_bytes", + "non-persistent_-_topic_mqput/mqput1_count": "non_persistent_topic_mqput_mqput1_count", + "persistent_-_topic_mqput/mqput1_count": "persistent_topic_mqput_mqput1_count", + "failed_topic_mqput/mqput1_count": "failed_topic_mqput_mqput1_count", + "mqconn/mqconnx_count": "mqconn_mqconnx_count", + "failed_mqconn/mqconnx_count": "failed_mqconn_mqconnx_count", + "concurrent_connections_-_high_water_mark": "concurrent_connections_high_water_mark", + "mqdisc_count": "mqdisc_count", + "mqopen_count": "mqopen_count", + "failed_mqopen_count": "failed_mqopen_count", + "mqclose_count": "mqclose_count", + "failed_mqclose_count": "failed_mqclose_count", + "mqput/mqput1_count": "mqput_mqput1_count", + "mqput_byte_count": "mqput_bytes", + "mqput_non-persistent_message_count": "mqput_non_persistent_message_count", + "mqput_persistent_message_count": "mqput_persistent_message_count", + "mqput1_non-persistent_message_count": "mqput1_non_persistent_message_count", + "mqput1_persistent_message_count": "mqput1_persistent_message_count", + "non-persistent_byte_count": "non_persistent_bytes", + "persistent_byte_count": "persistent_bytes", + "queue_avoided_puts": "queue_avoided_puts_percentage", + "queue_avoided_bytes": "queue_avoided_percentage", + "lock_contention": "lock_contention_percentage", + "rolled_back_mqput_count": "rolled_back_mqput_count", + "mqget_count": "mqget_count", + "mqget_byte_count": "mqget_bytes", + "destructive_mqget_non-persistent_message_count": "destructive_mqget_non_persistent_message_count", + "destructive_mqget_persistent_message_count": "destructive_mqget_persistent_message_count", + "destructive_mqget_non-persistent_byte_count": "destructive_mqget_non_persistent_bytes", + "destructive_mqget_persistent_byte_count": "destructive_mqget_persistent_bytes", + "mqget_browse_non-persistent_message_count": "mqget_browse_non_persistent_message_count", + "mqget_browse_persistent_message_count": "mqget_browse_persistent_message_count", + "mqget_browse_non-persistent_byte_count": "mqget_browse_non_persistent_bytes", + "mqget_browse_persistent_byte_count": "mqget_browse_persistent_bytes", + "destructive_mqget_fails": "destructive_mqget_fails", + "destructive_mqget_fails_with_mqrc_no_msg_available": "destructive_mqget_fails_with_mqrc_no_msg_available", + "destructive_mqget_fails_with_mqrc_truncated_msg_failed": "destructive_mqget_fails_with_mqrc_truncated_msg_failed", + "mqget_browse_fails": "mqget_browse_fails", + "mqget_browse_fails_with_mqrc_no_msg_available": "mqget_browse_fails_with_mqrc_no_msg_available", + "mqget_browse_fails_with_mqrc_truncated_msg_failed": "mqget_browse_fails_with_mqrc_truncated_msg_failed", + "rolled_back_mqget_count": "rolled_back_mqget_count", + "messages_expired": "expired_messages", + "queue_purged_count": "queue_purged_count", + "average_queue_time": "average_queue_time_seconds", + "queue_depth": "queue_depth", + + // Class: Native HA + "synchronous_log_bytes_sent": "synchronous_log_sent_bytes", + "catch-up_log_bytes_sent": "catch_up_log_sent_bytes", + "log_write_average_acknowledgement_latency": "log_write_average_acknowledgement_latency", + "log_write_average_acknowledgement_size": "log_write_average_acknowledgement_size", + "backlog_bytes": "backlog_bytes", + "backlog_average_bytes": "backlog_average_bytes", + "synchronous_compressed_log_bytes_sent": "synchronous_compressed_log_sent_bytes", + "catch-up_compressed_log_bytes_sent": "catch_up_compressed_log_sent_bytes", + "synchronous_uncompressed_log_bytes_sent": "synchronous_uncompressed_log_sent_bytes", + "catch-up_uncompressed_log_bytes_sent": "catch_up_uncompressed_log_sent_bytes", +} + +// This map contains only the additional elements where the heuristic version might not be suitable or +// match well-enough to some other implementations like the MQ Cloud package. For now, you have to +// opt in to using this map with an environment variable, as it would break compatibility with existing dashboards. +var mManual = map[string]string{ + "ram_total_bytes": "ram_size_bytes", + + // Don't need the "mq_" on the front + "mq_trace_file_system_-_bytes_in_use": "trace_file_system_in_use_bytes", + "mq_trace_file_system_-_free_space": "trace_file_system_free_space_percentage", + "mq_errors_file_system_-_bytes_in_use": "errors_file_system_in_use_bytes", + "mq_errors_file_system_-_free_space": "errors_file_system_free_space_percentage", + "mq_fdc_file_count": "fdc_files", -// Convert the description of the resource publication element into a metric name + // Flip around some of the elements + "create_durable_subscription_count": "durable_subscription_create_count", + "delete_durable_subscription_count": "durable_subscription_delete_count", + "alter_durable_subscription_count": "durable_subscription_alter_count", + "resume_durable_subscription_count": "durable_subscription_resume_count", + + "create_non-durable_subscription_count": "non_durable_subscription_create_count", + "delete_non-durable_subscription_count": "non_durable_subscription_delete_count", + + "failed_create/alter/resume_subscription_count": "failed_subscription_create_alter_resume_count", + "subscription_delete_failure_count": "failed_subscription_delete_count", +} + +// These are the explicitly-named attributes returned from DISPLAY xxSTATUS or DISPLAY xx +// commands. This map will be used to convert the metric names from the hardcoded defaults in +// each object type's module to a canonical format if the current version is wrong. For now, +// this is still an opt-in function as using it would break compatibility with existing +// dashboards. We start with a map that returns an unchanged name; it may need to evolve. +// Note that some of the keys would be repeated for the different object types (eg "status") but +// those duplicates are commented out. +var mAttr = map[string]string{ + // AMQP CHANNELS + "clientid": "clientid", + // "connection_count": "connection_count", // QMgr already has a map for this name + "messages_rcvd": "messages_rcvd", + "messages_sent": "messages_sent", + + // CHANNELS + "batches": "batches", + "batchsz_long": "batchsz_long", + "batchsz_short": "batchsz_short", + "buffers_rcvd": "buffers_rcvd", + "buffers_sent": "buffers_sent", + "bytes_rcvd": "bytes_rcvd", + "bytes_sent": "bytes_sent", + "connname": "connname", + "cur_inst": "cur_inst", + "instance_type": "instance_type", + "jobname": "jobname", + "attribute_max_inst": "attribute_max_inst", + "attribute_max_instc": "attribute_max_instc", + "messages": "messages", + "nettime_long": "nettime_long", + "nettime_short": "nettime_short", + "rqmname": "rqmname", + "time_since_msg": "time_since_msg", + "status": "status", + "status_squash": "status_squash", + "substate": "substate", + "type": "type", + "xmitq_time_long": "xmitq_time_long", + "xmitq_time_short": "xmitq_time_short", + + // CLUSTER + "qmtype": "qmtype", + // "status": "status", // already have a map entry for this + "suspend": "suspend", + + // QMGR + "active_listeners": "active_listeners", + "channel_initiator_status": "channel_initiator_status", + "command_server_status": "command_server_status", + "connection_count": "connection_count", + "log_extent_archive": "log_extent_archive", + "log_size_archive": "log_size_archive", + "log_extent_current": "log_extent_current", + "log_extent_media": "log_extent_media", + "log_size_media": "log_size_media", + "log_extent_restart": "log_extent_restart", + "log_size_restart": "log_size_restart", + "log_size_reusable": "log_size_reusable", + "max_active_channels": "max_active_channels", + "max_channels": "max_channels", + "max_tcp_channels": "max_tcp_channels", + // "status": "status", + "uptime": "uptime", + + // QUEUE + "qfile_current_size": "qfile_current_size", + "qfile_max_size": "qfile_max_size", + "depth": "depth", + "mqget_count": "mqget_count", + "hi_depth": "hi_depth", + "mqput_mqput1_count": "mqput_mqput1_count", + "input_handles": "input_handles", + "attribute_max_depth": "attribute_max_depth", + "oldest_message_age": "oldest_message_age", + "output_handles": "output_handles", + "qtime_long": "qtime_long", + "qtime_short": "qtime_short", + "time_since_get": "time_since_get", + "time_since_put": "time_since_put", + "uncommitted_messages": "uncommitted_messages", + "attribute_usage": "attribute_usage", + + // SUBSCRIPTIONS + "subid": "subid", + "messsages_received": "messsages_received", + "time_since_message_published": "time_since_message_published", + "topic": "topic", + // "type": "type", + + // TOPICS + "publisher_count": "publisher_count", + "messages_published": "messages_published", + "time_since_msg_published": "time_since_msg_published", + "time_since_msg_received": "time_since_msg_received", + // "type": "type", // Already have a map entry for this + "messages_received": "messages_received", + "subscriber_count": "subscriber_count", + + // USAGE - pageset/bufferpool attributes + "pageclass": "pageclass", + "buffers_free": "buffers_free", + "buffers_free_percent": "buffers_free_percent", + "location": "location", + "buffers_total": "buffers_total", + "bufferpool": "bufferpool", + "expansion_count": "expansion_count", + "pages_nonpersistent": "pages_nonpersistent", + "pages_persistent": "pages_persistent", + // "status": "status", + "pages_total": "pages_total", + "pages_unused": "pages_unused", + + "id": "id", + "name": "name", +} + +// This is automatically called at package startup. It doesn't affect any other +// part of this package. +func init() { + // Have to deliberately opt into using the non-heuristic maps for now + if os.Getenv("IBMMQ_MANUAL_METRIC_MAPS") != "" { + UseManualMetricMaps = true + } else { + UseManualMetricMaps = false + } +} + +// Convert the description of the resource publication element into a metric name. // This has always been done using a heuristic algorithm, but we may want to change some of them // to a format preferred by the backend (eg OpenTelemetry). func formatDescription(elem *MonElement) string { s := "" - if !mapsFilled { - // Have to opt into using the non-heuristic maps for now - if os.Getenv("IBMMQ_MANUAL_METRIC_MAPS") != "" { - UseManualMetricMaps = true - } else { - UseManualMetricMaps = false - } - fillMapManual() - fillMapHeur() - - mapsFilled = true - } - if UseManualMetricMaps { s = formatDescriptionManual(elem.Description) } @@ -92,8 +380,21 @@ func formatDescriptionManual(s string) string { } } +// Attributes are already in a preferred format, but we will have a chance to override them. +func formatAttrName(in string) string { + + if UseManualMetricMaps { + if out, ok := mAttr[in]; ok { + return out + } + logWarn("Attribute \"%s\" does not have a defined metric name in mAttr map", in) + } + + return in +} + // This function is exported so it can be called during the build/test process for automatic generation -// of some of the mHeur map elements. +// of some of the mHeur map elements. No longer fully used at runtime as the metric names have been pre-coded in the map. func FormatDescriptionHeuristic(elem *MonElement, useMap bool) string { // The map has been generated once by hand and we will try to use it. @@ -104,12 +405,12 @@ func FormatDescriptionHeuristic(elem *MonElement, useMap bool) string { if s, ok := mHeur[desc]; ok { return s } else { - logWarn("Element %s does not have a defined metric name", elem.Description) + logWarn("Element \"%s\" does not have a defined metric name in mHeur map", elem.Description) } } - // If that fails, we go through generating the metric name using this set of - // rules. + // If that fails, we go through generating the metric name using this set of rules. + // From here, we should only usually be running during the build-checking process s := elem.Description s = strings.Replace(s, " ", "_", -1) s = strings.Replace(s, "/", "_", -1) @@ -165,179 +466,3 @@ func FormatDescriptionHeuristic(elem *MonElement, useMap bool) string { return s } - -// These are the original heuristically-derived metric names. This was built from running -// the code once and capturing info from traces. Any new metrics should show up from tools run -// during the release process. -func fillMapHeur() { - // Class: CPU - mHeur["user_cpu_time_percentage"] = "user_cpu_time_percentage" - mHeur["system_cpu_time_percentage"] = "system_cpu_time_percentage" - mHeur["cpu_load_-_one_minute_average"] = "cpu_load_one_minute_average_percentage" - mHeur["cpu_load_-_five_minute_average"] = "cpu_load_five_minute_average_percentage" - mHeur["cpu_load_-_fifteen_minute_average"] = "cpu_load_fifteen_minute_average_percentage" - mHeur["ram_free_percentage"] = "ram_free_percentage" - mHeur["ram_total_bytes"] = "ram_total_bytes" - mHeur["user_cpu_time_-_percentage_estimate_for_queue_manager"] = "user_cpu_time_estimate_for_queue_manager_percentage" - mHeur["system_cpu_time_-_percentage_estimate_for_queue_manager"] = "system_cpu_time_estimate_for_queue_manager_percentage" - mHeur["ram_total_bytes_-_estimate_for_queue_manager"] = "ram_total_estimate_for_queue_manager_bytes" - - // Class: Disk - mHeur["mq_trace_file_system_-_bytes_in_use"] = "mq_trace_file_system_in_use_bytes" - mHeur["mq_trace_file_system_-_free_space"] = "mq_trace_file_system_free_space_percentage" - mHeur["mq_errors_file_system_-_bytes_in_use"] = "mq_errors_file_system_in_use_bytes" - mHeur["mq_errors_file_system_-_free_space"] = "mq_errors_file_system_free_space_percentage" - mHeur["mq_fdc_file_count"] = "mq_fdc_file_count" - mHeur["queue_manager_file_system_-_bytes_in_use"] = "queue_manager_file_system_in_use_bytes" - mHeur["queue_manager_file_system_-_free_space"] = "queue_manager_file_system_free_space_percentage" - mHeur["log_-_bytes_in_use"] = "log_in_use_bytes" - mHeur["log_-_bytes_max"] = "log_max_bytes" - mHeur["log_file_system_-_bytes_in_use"] = "log_file_system_in_use_bytes" - mHeur["log_file_system_-_bytes_max"] = "log_file_system_max_bytes" - mHeur["log_-_physical_bytes_written"] = "log_physical_written_bytes" - mHeur["log_-_logical_bytes_written"] = "log_logical_written_bytes" - mHeur["log_-_write_latency"] = "log_write_latency_seconds" - mHeur["log_-_current_primary_space_in_use"] = "log_current_primary_space_in_use_percentage" - mHeur["log_-_workload_primary_space_utilization"] = "log_workload_primary_space_utilization_percentage" - mHeur["log_-_bytes_required_for_media_recovery"] = "log_required_for_media_recovery_bytes" - mHeur["log_-_bytes_occupied_by_reusable_extents"] = "log_occupied_by_reusable_extents_bytes" - mHeur["log_-_bytes_occupied_by_extents_waiting_to_be_archived"] = "log_occupied_by_extents_waiting_to_be_archived_bytes" - mHeur["log_-_write_size"] = "log_write_size_bytes" - - mHeur["appliance_data_-_bytes_in_use"] = "appliance_data_in_use_bytes" - mHeur["appliance_data_-_free_space"] = "appliance_data_free_space_percentage" - mHeur["system_volume_-_bytes_in_use"] = "system_volume_in_use_bytes" - mHeur["system_volume_-_free_space"] = "system_volume_free_space_percentage" - - // Class: STATQ and STATMQI - mHeur["mqinq_count"] = "mqinq_count" - mHeur["failed_mqinq_count"] = "failed_mqinq_count" - mHeur["mqset_count"] = "mqset_count" - mHeur["failed_mqset_count"] = "failed_mqset_count" - mHeur["interval_total_mqput/mqput1_count"] = "interval_mqput_mqput1_total_count" - mHeur["interval_total_mqput/mqput1_byte_count"] = "interval_mqput_mqput1_total_bytes" - mHeur["non-persistent_message_mqput_count"] = "non_persistent_message_mqput_count" - mHeur["persistent_message_mqput_count"] = "persistent_message_mqput_count" - mHeur["failed_mqput_count"] = "failed_mqput_count" - mHeur["non-persistent_message_mqput1_count"] = "non_persistent_message_mqput1_count" - mHeur["persistent_message_mqput1_count"] = "persistent_message_mqput1_count" - mHeur["failed_mqput1_count"] = "failed_mqput1_count" - mHeur["put_non-persistent_messages_-_byte_count"] = "put_non_persistent_messages_bytes" - mHeur["put_persistent_messages_-_byte_count"] = "put_persistent_messages_bytes" - mHeur["mqstat_count"] = "mqstat_count" - mHeur["interval_total_destructive_get-_count"] = "interval_destructive_get_total_count" - mHeur["interval_total_destructive_get_-_byte_count"] = "interval_destructive_get_total_bytes" - mHeur["non-persistent_message_destructive_get_-_count"] = "non_persistent_message_destructive_get_count" - mHeur["persistent_message_destructive_get_-_count"] = "persistent_message_destructive_get_count" - mHeur["failed_mqget_-_count"] = "failed_mqget_count" - mHeur["got_non-persistent_messages_-_byte_count"] = "got_non_persistent_messages_bytes" - mHeur["got_persistent_messages_-_byte_count"] = "got_persistent_messages_bytes" - mHeur["non-persistent_message_browse_-_count"] = "non_persistent_message_browse_count" - mHeur["persistent_message_browse_-_count"] = "persistent_message_browse_count" - mHeur["failed_browse_count"] = "failed_browse_count" - mHeur["non-persistent_message_browse_-_byte_count"] = "non_persistent_message_browse_bytes" - mHeur["persistent_message_browse_-_byte_count"] = "persistent_message_browse_bytes" - mHeur["expired_message_count"] = "expired_message_count" - mHeur["purged_queue_count"] = "purged_queue_count" - mHeur["mqcb_count"] = "mqcb_count" - mHeur["failed_mqcb_count"] = "failed_mqcb_count" - mHeur["mqctl_count"] = "mqctl_count" - mHeur["commit_count"] = "commit_count" - mHeur["rollback_count"] = "rollback_count" - mHeur["create_durable_subscription_count"] = "create_durable_subscription_count" - mHeur["alter_durable_subscription_count"] = "alter_durable_subscription_count" - mHeur["resume_durable_subscription_count"] = "resume_durable_subscription_count" - mHeur["create_non-durable_subscription_count"] = "create_non_durable_subscription_count" - mHeur["failed_create/alter/resume_subscription_count"] = "failed_create_alter_resume_subscription_count" - mHeur["delete_durable_subscription_count"] = "delete_durable_subscription_count" - mHeur["delete_non-durable_subscription_count"] = "delete_non_durable_subscription_count" - mHeur["subscription_delete_failure_count"] = "subscription_delete_failure_count" - mHeur["mqsubrq_count"] = "mqsubrq_count" - mHeur["failed_mqsubrq_count"] = "failed_mqsubrq_count" - mHeur["durable_subscriber_-_high_water_mark"] = "durable_subscriber_high_water_mark" - mHeur["durable_subscriber_-_low_water_mark"] = "durable_subscriber_low_water_mark" - mHeur["non-durable_subscriber_-_high_water_mark"] = "non_durable_subscriber_high_water_mark" - mHeur["non-durable_subscriber_-_low_water_mark"] = "non_durable_subscriber_low_water_mark" - mHeur["topic_mqput/mqput1_interval_total"] = "topic_mqput_mqput1_interval_total" - mHeur["interval_total_topic_bytes_put"] = "interval_topic_put_total" - mHeur["published_to_subscribers_-_message_count"] = "published_to_subscribers_message_count" - mHeur["published_to_subscribers_-_byte_count"] = "published_to_subscribers_bytes" - mHeur["non-persistent_-_topic_mqput/mqput1_count"] = "non_persistent_topic_mqput_mqput1_count" - mHeur["persistent_-_topic_mqput/mqput1_count"] = "persistent_topic_mqput_mqput1_count" - mHeur["failed_topic_mqput/mqput1_count"] = "failed_topic_mqput_mqput1_count" - mHeur["mqconn/mqconnx_count"] = "mqconn_mqconnx_count" - mHeur["failed_mqconn/mqconnx_count"] = "failed_mqconn_mqconnx_count" - mHeur["concurrent_connections_-_high_water_mark"] = "concurrent_connections_high_water_mark" - mHeur["mqdisc_count"] = "mqdisc_count" - mHeur["mqopen_count"] = "mqopen_count" - mHeur["failed_mqopen_count"] = "failed_mqopen_count" - mHeur["mqclose_count"] = "mqclose_count" - mHeur["failed_mqclose_count"] = "failed_mqclose_count" - mHeur["mqput/mqput1_count"] = "mqput_mqput1_count" - mHeur["mqput_byte_count"] = "mqput_bytes" - mHeur["mqput_non-persistent_message_count"] = "mqput_non_persistent_message_count" - mHeur["mqput_persistent_message_count"] = "mqput_persistent_message_count" - mHeur["mqput1_non-persistent_message_count"] = "mqput1_non_persistent_message_count" - mHeur["mqput1_persistent_message_count"] = "mqput1_persistent_message_count" - mHeur["non-persistent_byte_count"] = "non_persistent_bytes" - mHeur["persistent_byte_count"] = "persistent_bytes" - mHeur["queue_avoided_puts"] = "queue_avoided_puts_percentage" - mHeur["queue_avoided_bytes"] = "queue_avoided_percentage" - mHeur["lock_contention"] = "lock_contention_percentage" - mHeur["rolled_back_mqput_count"] = "rolled_back_mqput_count" - mHeur["mqget_count"] = "mqget_count" - mHeur["mqget_byte_count"] = "mqget_bytes" - mHeur["destructive_mqget_non-persistent_message_count"] = "destructive_mqget_non_persistent_message_count" - mHeur["destructive_mqget_persistent_message_count"] = "destructive_mqget_persistent_message_count" - mHeur["destructive_mqget_non-persistent_byte_count"] = "destructive_mqget_non_persistent_bytes" - mHeur["destructive_mqget_persistent_byte_count"] = "destructive_mqget_persistent_bytes" - mHeur["mqget_browse_non-persistent_message_count"] = "mqget_browse_non_persistent_message_count" - mHeur["mqget_browse_persistent_message_count"] = "mqget_browse_persistent_message_count" - mHeur["mqget_browse_non-persistent_byte_count"] = "mqget_browse_non_persistent_bytes" - mHeur["mqget_browse_persistent_byte_count"] = "mqget_browse_persistent_bytes" - mHeur["destructive_mqget_fails"] = "destructive_mqget_fails" - mHeur["destructive_mqget_fails_with_mqrc_no_msg_available"] = "destructive_mqget_fails_with_mqrc_no_msg_available" - mHeur["destructive_mqget_fails_with_mqrc_truncated_msg_failed"] = "destructive_mqget_fails_with_mqrc_truncated_msg_failed" - mHeur["mqget_browse_fails"] = "mqget_browse_fails" - mHeur["mqget_browse_fails_with_mqrc_no_msg_available"] = "mqget_browse_fails_with_mqrc_no_msg_available" - mHeur["mqget_browse_fails_with_mqrc_truncated_msg_failed"] = "mqget_browse_fails_with_mqrc_truncated_msg_failed" - mHeur["rolled_back_mqget_count"] = "rolled_back_mqget_count" - mHeur["messages_expired"] = "expired_messages" - mHeur["queue_purged_count"] = "queue_purged_count" - mHeur["average_queue_time"] = "average_queue_time_seconds" - mHeur["queue_depth"] = "queue_depth" - - // Class: Native HA - mHeur["synchronous_log_bytes_sent"] = "synchronous_log_sent_bytes" - mHeur["catch-up_log_bytes_sent"] = "catch_up_log_sent_bytes" - mHeur["log_write_average_acknowledgement_latency"] = "log_write_average_acknowledgement_latency" - mHeur["log_write_average_acknowledgement_size"] = "log_write_average_acknowledgement_size" - mHeur["backlog_bytes"] = "backlog_bytes" - mHeur["backlog_average_bytes"] = "backlog_average_bytes" -} - -// This map will contain only the additional elements where the heuristic version might not be suitable or -// match well-enough to some other implementations like the MQ Cloud package -func fillMapManual() { - mManual["ram_total_bytes"] = "ram_size_bytes" - - // Don't need the "mq_" on the front - mManual["mq_trace_file_system_-_bytes_in_use"] = "trace_file_system_in_use_bytes" - mManual["mq_trace_file_system_-_free_space"] = "trace_file_system_free_space_percentage" - mManual["mq_errors_file_system_-_bytes_in_use"] = "errors_file_system_in_use_bytes" - mManual["mq_errors_file_system_-_free_space"] = "errors_file_system_free_space_percentage" - mManual["mq_fdc_file_count"] = "fdc_files" - - // Flip around some of the elements - mManual["create_durable_subscription_count"] = "durable_subscription_create_count" - mManual["alter_durable_subscription_count"] = "durable_subscription_alter_count" - mManual["resume_durable_subscription_count"] = "durable_subscription_resume_count" - mManual["delete_durable_subscription_count"] = "durable_subscription_delete_count" - - mManual["create_non-durable_subscription_count"] = "non_durable_subscription_create_count" - mManual["delete_non-durable_subscription_count"] = "non_durable_subscription_delete_count" - - mManual["failed_create/alter/resume_subscription_count"] = "failed_subscription_create_alter_resume_count" - mManual["subscription_delete_failure_count"] = "failed_subscription_delete_count" - -} diff --git a/mqmetric/metrics.txt b/mqmetric/metrics.txt index 8ac919a..1084d18 100644 --- a/mqmetric/metrics.txt +++ b/mqmetric/metrics.txt @@ -5,205 +5,212 @@ Note that the actual name of produced metrics may vary for each different collec they are derived from these basic names and object classes. The available metrics may also vary by queue manager platform and version. -If you are using the Prometheus collector, one way to display all of the available metrics +If you are using the Prometheus collector, one way to display all of the available metrics including the resource publication metrics, showing the real names, is to disable -the actual collection process within Prometheus and call the collector directly. For example, +the actual collection process within Prometheus and call the collector directly. For example, curl :9157/metrics | grep "^ibmmq" Alternatively, you can look directly at the database. For example, go to "http://:9090" -and type "ibmmq_" into the expression bar. That should provide a complete list of available metrics. +and type "ibmmq_" into the expression bar. That should provide a complete list of available metrics. Similar approaches can be used for the other databases. -Metrics published on system topics +Metrics published on system topics ---------------------------------- -The metrics published by the queue manager under the $SYS topic tree are listed here as extracted from -the product documentation at https://www.ibm.com/docs/en/ibm-mq/latest?topic=trace-metrics-published-system-topics. +Metrics published by the queue manager under the $SYS topic tree are documented +at https://www.ibm.com/docs/en/ibm-mq/latest?topic=trace-metrics-published-system-topics. Access to these metrics requires the "usePublications" configuration attribute to be set for the collector. -Class and Type values match what you would see in the amqsrua sample program. -The actual names of these metrics as seen in a database will vary, but they +The actual names of these metrics as seen in a database will vary, but they are usually a combination of the product name and the metric description: Class: CPU - Type: SystemSummary - User CPU time percentage - System CPU time percentage - CPU load - one minute average - CPU load - five minute average - CPU load - fifteen minute average - RAM free percentage - RAM total bytes Type: QMgrSummary - User CPU time - percentage estimate for queue manager - System CPU time - percentage estimate for queue manager - RAM total bytes - estimate for queue manager + RAM total bytes - estimate for queue manager + System CPU time - percentage estimate for queue manager + User CPU time - percentage estimate for queue manager + Type: SystemSummary + CPU load - fifteen minute average + CPU load - one minute average + CPU load - five minute average + RAM total bytes + RAM free percentage + System CPU time percentage + User CPU time percentage Class: DISK - Type: SystemSummary - MQ errors file system - bytes in use - MQ errors file system - free space - MQ FDC file count - MQ trace file system - bytes in use - MQ trace file system - free space - Type: QMgrSummary - Queue Manager file system - bytes in use - Queue Manager file system - free space Type: Log - Log - bytes in use - Log - bytes max - Log file system - bytes in use - Log file system - bytes max - Log - physical bytes written for the current interval X - Log - logical bytes written for the current interval - Log - write latency uSec - Log - write size X, also rolling average - Log - occupied by extents waiting to be archived X - Log - space in MB required for media recovery X - Log - space in MB occupied by reusable extents - Log - current primary space in use - Log - workload primary space utilization + Log - bytes occupied by extents waiting to be archived + Log - bytes in use + Log - bytes max + Log file system - bytes in use + Log file system - bytes max + Log - write latency + Log - logical bytes written + Log - bytes required for media recovery + Log - physical bytes written + Log - bytes occupied by reusable extents + Log - current primary space in use + Log - workload primary space utilization + Log - write size + Type: QMgrSummary + Queue Manager file system - free space + Queue Manager file system - bytes in use + Type: SystemSummary + Appliance data - free space + Appliance data - bytes in use + System volume - free space + System volume - bytes in use + MQ FDC file count + MQ errors file system - free space + MQ errors file system - bytes in use + MQ trace file system - free space + MQ trace file system - bytes in use + +Class: NHAREPLICA + Type: REPLICATION + Log write average acknowledgement latency + Log write average acknowledgement size + Backlog average bytes + Backlog bytes + Catch-up log bytes sent + Catch-up compressed log bytes sent + Catch-up uncompressed log bytes sent + Synchronous log bytes sent + Synchronous compressed log bytes sent + Synchronous uncompressed log bytes sent Class: STATMQI Type: CONNDISC - MQCONN/MQCONNX count - Failed MQCONN/MQCONNX count - Concurrent connections - high water mark - MQDISC count - Type: OPENCLOSE - MQOPEN count - Failed MQOPEN count - MQCLOSE count - Failed MQCLOSE count + Failed MQCONN/MQCONNX count + Concurrent connections - high water mark + MQCONN/MQCONNX count + MQDISC count + Type: GET + Non-persistent message browse - byte count + Persistent message browse - byte count + Failed browse count + Non-persistent message browse - count + Persistent message browse - count + Interval total destructive get - byte count + Got non-persistent messages - byte count + Got persistent messages - byte count + Failed MQCB count + MQCB count + MQCTL count + Failed MQGET - count + Interval total destructive get- count + Non-persistent message destructive get - count + Persistent message destructive get - count + Expired message count + Purged queue count Type: INQSET - MQINQ count - Failed MQINQ count - MQSET count - Failed MQSET count + Failed MQINQ count + MQINQ count + Failed MQSET count + MQSET count + Type: OPENCLOSE + Failed MQCLOSE count + MQCLOSE count + Failed MQOPEN count + MQOPEN count + Type: PUBLISH + Published to subscribers - byte count + Published to subscribers - message count + Interval total topic bytes put + Failed topic MQPUT/MQPUT1 count + Non-persistent - topic MQPUT/MQPUT1 count + Persistent - topic MQPUT/MQPUT1 count + Topic MQPUT/MQPUT1 interval total Type: PUT - Interval total MQPUT/MQPUT1 count - Interval total MQPUT/MQPUT1 byte count - Non-persistent message MQPUT count - Persistent message MQPUT count - Failed MQPUT count - Non-persistent message MQPUT1 count - Persistent message MQPUT1 count - Failed MQPUT1 count - Put non-persistent messages - byte count - Put persistent messages - byte count - MQSTAT count - Type: GET - Interval total destructive get- count - Interval total destructive get - byte count - Non-persistent message destructive get - count - Persistent message destructive get - count - Failed MQGET - count - Got non-persistent messages - byte count - Got persistent messages - byte count - Non-persistent message browse - count - Persistent message browse - count - Failed browse count - Non-persistent message browse - byte count - Persistent message browse - byte count - Expired message count - Purged queue count - MQCB count - Failed MQCB count - MQCTL count - Type: SYNCPOINT - Commit count - Rollback count + Interval total MQPUT/MQPUT1 byte count + Put non-persistent messages - byte count + Put persistent messages - byte count + Failed MQPUT1 count + Non-persistent message MQPUT1 count + Persistent message MQPUT1 count + Failed MQPUT count + Interval total MQPUT/MQPUT1 count + Non-persistent message MQPUT count + Persistent message MQPUT count + MQSTAT count Type: SUBSCRIBE - Create durable subscription count - Alter durable subscription count - Resume durable subscription count - Create non-durable subscription count - Failed create/alter/resume subscription count - Delete durable subscription count - Delete non-durable subscription count - Subscription delete failure count - MQSUBRQ count - Failed MQSUBRQ count - Durable subscriber - high water mark - Durable subscriber - low water mark - Non-durable subscriber - high water mark - Non-durable subscriber - low water mark - Type: PUBLISH - Topic MQPUT/MQPUT1 interval total - Interval total topic bytes put - Published to subscribers - message count - Published to subscribers - byte count - Non-persistent - topic MQPUT/MQPUT1 count - Persistent - topic MQPUT/MQPUT1 count - Failed topic MQPUT/MQPUT1 count + Durable subscriber - high water mark + Durable subscriber - low water mark + Non-durable subscriber - high water mark + Non-durable subscriber - low water mark + Failed MQSUBRQ count + MQSUBRQ count + Alter durable subscription count + Create durable subscription count + Resume durable subscription count + Failed create/alter/resume subscription count + Create non-durable subscription count + Delete durable subscription count + Subscription delete failure count + Delete non-durable subscription count + Type: SYNCPOINT + Rollback count + Commit count Class: STATQ Type: GENERAL - messages expired - queue purged count - average queue time uSec - Queue depth - Type: OPENCLOSE - MQOPEN count - MQCLOSE count + messages expired + Queue depth + queue purged count + average queue time + Type: GET + MQGET browse non-persistent byte count + MQGET browse persistent byte count + MQGET browse fails + MQGET browse fails with MQRC_NO_MSG_AVAILABLE + MQGET browse non-persistent message count + MQGET browse persistent message count + MQGET browse fails with MQRC_TRUNCATED_MSG_FAILED + MQGET byte count + destructive MQGET non-persistent byte count + destructive MQGET persistent byte count + destructive MQGET fails + MQGET count + destructive MQGET non-persistent message count + destructive MQGET persistent message count + destructive MQGET fails with MQRC_NO_MSG_AVAILABLE + rolled back MQGET count + destructive MQGET fails with MQRC_TRUNCATED_MSG_FAILED Type: INQSET - MQINQ count - MQSET count + MQINQ count + MQSET count + Type: OPENCLOSE + MQCLOSE count + MQOPEN count Type: PUT - MQPUT/MQPUT1 count - MQPUT byte count - MQPUT non-persistent message count - MQPUT persistent message count - rolled back MQPUT count - MQPUT1 non-persistent message count - MQPUT1 persistent message count - non-persistent byte count - persistent byte count - lock contention - queue avoided puts - queue avoided bytes - Type: GET - MQGET count - MQGET byte count - destructive MQGET non-persistent message count - destructive MQGET persistent message count - rolled back MQGET count - destructive MQGET non-persistent byte count - destructive MQGET persistent byte count - MQGET browse non-persistent message count - MQGET browse persistent message count - MQGET browse non-persistent byte count - MQGET browse persistent byte count - destructive MQGET fails - destructive MQGET fails with MQRC_NO_MSG_AVAILABLE - destructive MQGET fails with MQRC_TRUNCATED_MSG_FAILED - MQGET browse fails - MQGET browse fails with MQRC_NO_MSG_AVAILABLE - MQGET browse fails with MQRC_TRUNCATED_MSG_FAILED - -Class: NHAREPLICA - Type: REPLICATION - Synchronous log bytes sent - Catch-up log bytes sent - Log write average acknowledgement latency uSec - Log write average acknowledgement size - Backlog bytes - Backlog average bytes + queue avoided bytes + queue avoided puts + MQPUT byte count + non-persistent byte count + persistent byte count + MQPUT1 non-persistent message count + MQPUT1 persistent message count + MQPUT/MQPUT1 count + MQPUT non-persistent message count + MQPUT persistent message count + lock contention + rolled back MQPUT count Other metrics and attributes ---------------------------- There are other metrics extracted or calculated by this package, or used as tags. Most of -these values come from "DISPLAY xxSTATUS" or "DISPLAY xx" commands for the relevant object type and name. -Each line here shows the variable in the mqmetric package source code (so you can see how it is derived) +these values come from "DISPLAY xxSTATUS" or "DISPLAY xx" commands for the relevant object type and name. +Each line here shows the variable in the mqmetric package source code (so you can see how it is derived) and the basic associated metric name. As an example, one of the metrics available in Prometheus might be "ibmmq_channel_bytes_sent" with the full name created by combining the product name, the class, and the individual metric. -Access to these metrics requires the "useObjectStatus" (or "-ibmmq.useStatus" as command line flag) configuration +Access to these metrics requires the "useObjectStatus" (or "-ibmmq.useStatus" as command line flag) configuration attribute to be set for the collector. Class: amqp @@ -309,4 +316,4 @@ Class: bufferpool/pageset ATTR_PS_TOTAL : pages_total ATTR_PS_UNUSED : pages_unused -This page was automatically generated from the source tree on 2024-02-22 11:01:40 +This page was automatically generated from the source tree on 2024-06-11 06:33:21 diff --git a/mqmetric/mqif.go b/mqmetric/mqif.go index a4da9f1..a8f845c 100644 --- a/mqmetric/mqif.go +++ b/mqmetric/mqif.go @@ -200,7 +200,7 @@ func initConnectionKey(key string, qMgrName string, replyQ string, replyQ2 strin ibmmq.MQIA_MAX_HANDLES, ibmmq.MQIA_PLATFORM} - v, err = ci.si.qMgrObject.InqMap(selectors) + v, err = ci.si.qMgrObject.Inq(selectors) if err == nil { ci.si.resolvedQMgrName = v[ibmmq.MQCA_Q_MGR_NAME].(string) ci.si.platform = v[ibmmq.MQIA_PLATFORM].(int32) @@ -664,3 +664,8 @@ func GetCommandLevel() int32 { ci := getConnection(GetConnectionKey()) return ci.si.commandLevel } + +func GetResolvedQMgrName() string { + ci := getConnection(GetConnectionKey()) + return ci.si.resolvedQMgrName +} diff --git a/mqmetric/queue.go b/mqmetric/queue.go index 43a7dd5..1aacead 100644 --- a/mqmetric/queue.go +++ b/mqmetric/queue.go @@ -356,7 +356,7 @@ func inquireQueueAttributes(objectPatternsList string) error { pcfparm = new(ibmmq.PCFParameter) pcfparm.Type = ibmmq.MQCFT_INTEGER_LIST pcfparm.Parameter = ibmmq.MQIACF_Q_ATTRS - pcfparm.Int64Value = []int64{int64(ibmmq.MQIA_MAX_Q_DEPTH), int64(ibmmq.MQIA_USAGE), int64(ibmmq.MQCA_Q_DESC), int64(ibmmq.MQCA_CLUSTER_NAME)} + pcfparm.Int64Value = []int64{int64(ibmmq.MQIA_MAX_Q_DEPTH), int64(ibmmq.MQIA_USAGE), int64(ibmmq.MQIA_DEFINITION_TYPE), int64(ibmmq.MQCA_Q_DESC), int64(ibmmq.MQCA_CLUSTER_NAME)} cfh.ParameterCount++ buf = append(buf, pcfparm.Bytes()...) @@ -580,6 +580,13 @@ func parseQAttrData(cfh *ibmmq.MQCFH, buf []byte) { qInfo.AttrUsage = v } } + case ibmmq.MQIA_DEFINITION_TYPE: + v := elem.Int64Value[0] + if v > 0 { + if qInfo, ok := qInfoMap[qName]; ok { + qInfo.DefType = v + } + } case ibmmq.MQCA_Q_DESC: v := elem.String[0] if v != "" { @@ -608,30 +615,42 @@ func QueueNormalise(attr *StatusAttribute, v int64) float64 { return statusNormalise(attr, v) } -// Return the nominated MQCA* attribute from the object's attributes +// Return the nominated MQCA*/MQIA* attribute from the object's attributes // stored in the map func GetQueueAttribute(key string, attribute int32) string { var o *ObjInfo - v := "-" + v := DUMMY_STRING ok := false o, ok = qInfoMap[key] if !ok { // return something so Prometheus doesn't turn it into "0.0" - return "-" + return DUMMY_STRING } switch attribute { case ibmmq.MQCA_CLUSTER_NAME: v = o.Cluster + case ibmmq.MQIA_DEFINITION_TYPE: + defType := int32(o.DefType) + switch defType { + case ibmmq.MQQDT_PREDEFINED: + v = "Predefined" + case ibmmq.MQQDT_PERMANENT_DYNAMIC: + v = "PermDyn" + case ibmmq.MQQDT_TEMPORARY_DYNAMIC: + v = "TempDyn" + case ibmmq.MQQDT_SHARED_DYNAMIC: + v = "SharedDyn" + } default: - v = "-" + v = DUMMY_STRING } v = strings.TrimSpace(v) if v == "" { - v = "-" + v = DUMMY_STRING } return v } diff --git a/mqmetric/status.go b/mqmetric/status.go index 12db520..504f8ce 100644 --- a/mqmetric/status.go +++ b/mqmetric/status.go @@ -67,7 +67,7 @@ type StatusValue struct { // Initialise with default values. func newStatusAttribute(n string, d string, p int32) *StatusAttribute { s := new(StatusAttribute) - s.MetricName = n + s.MetricName = formatAttrName(n) // Convert to a canonical metric name s.Description = d s.Delta = false s.pcfAttr = p diff --git a/samples/runSample.deb.Dockerfile b/samples/runSample.deb.Dockerfile index 57ac687..878e778 100644 --- a/samples/runSample.deb.Dockerfile +++ b/samples/runSample.deb.Dockerfile @@ -24,7 +24,7 @@ # as possible while still using a "regular" libc-based container. # Start by setting some global variables that can still be overridden on the build command line. -ARG BASE_IMAGE=ubuntu:18.04 +ARG BASE_IMAGE=ubuntu:22.04 ARG GOPATH_ARG="/go" ARG GOVERSION=1.18 @@ -59,7 +59,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ curl \ tar \ bash \ - go-dep \ + golang \ build-essential \ && rm -rf /var/lib/apt/lists/* @@ -77,7 +77,7 @@ RUN mkdir -p $GOPATH/src $GOPATH/bin $GOPATH/pkg \ # Location of the downloadable MQ client package \ ENV RDURL="https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist" \ RDTAR="IBM-MQC-Redist-Linux${MQARCH}.tar.gz" \ - VRMF=9.3.5.0 + VRMF=9.4.0.0 # Install the MQ client from the Redistributable package. This also contains the # header files we need to compile against. Setup the subset of the package @@ -109,7 +109,7 @@ RUN cd $GOPATH_ARG/src && go mod tidy && go build -o $GOPATH_ARG/bin/amqsput amq ########################################################### # Now that there is a container with the compiled program we can build a smaller # runtime image. Start from one of the smaller base container images. -FROM debian:stretch-slim +FROM debian:bookworm-slim ARG GOPATH_ARG ARG GOVERSION diff --git a/samples/runSample.ubi.Dockerfile b/samples/runSample.ubi.Dockerfile index 0b468fb..64a24cc 100644 --- a/samples/runSample.ubi.Dockerfile +++ b/samples/runSample.ubi.Dockerfile @@ -56,7 +56,7 @@ RUN mkdir -p $GOPATH/src $GOPATH/bin $GOPATH/pkg \ # Location of the downloadable MQ client package \ ENV RDURL="https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist" \ RDTAR="IBM-MQC-Redist-Linux${MQARCH}.tar.gz" \ - VRMF=9.3.5.0 + VRMF=9.4.0.0 # Install the MQ client from the Redistributable package. This also contains the # header files we need to compile against. Setup the subset of the package