Skip to content

Commit 7d17830

Browse files
committed
Update for MQ 9.3.3
1 parent 2bace34 commit 7d17830

24 files changed

+88
-56
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Changelog
22
Newest updates are at the top of this file.
33

4+
## Jun 21 2023 - v5.5.0
5+
- Update for MQ 9.3.3
6+
- mqmetric - Configurable timeout for status queries (ibm-messaging/mq-metric-samples#227)
7+
48
## Feb 17 2023 - v5.4.0
59
- Update for MQ 9.3.2
610
- mqmetric - Add hostname tag for 9.3.2 qmgrs (added to DIS QMSTATUS response) (ibm-messaging/mq-metric-samples#184)

Dockerfile

+7-5
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ FROM $BASE_IMAGE
1717

1818
ARG GOPATH_ARG="/go"
1919
ARG GOVERSION=1.17
20+
ARG GOARCH=amd64
21+
ARG MQARCH=X64
2022

2123
ENV GOVERSION=${GOVERSION} \
2224
GOPATH=$GOPATH_ARG \
23-
GOTAR=go${GOVERSION}.linux-amd64.tar.gz \
25+
GOTAR=go${GOVERSION}.linux-${GOARCH}.tar.gz \
2426
ORG="github.com/ibm-messaging"
2527

2628

@@ -57,8 +59,8 @@ RUN mkdir -p $GOPATH/src $GOPATH/bin $GOPATH/pkg \
5759

5860
# Location of the downloadable MQ client package \
5961
ENV RDURL="https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist" \
60-
RDTAR="IBM-MQC-Redist-LinuxX64.tar.gz" \
61-
VRMF=9.3.2.0
62+
RDTAR="IBM-MQC-Redist-Linux${MQARCH}.tar.gz" \
63+
VRMF=9.3.3.0
6264

6365
# Install the MQ client from the Redistributable package. This also contains the
6466
# header files we need to compile against. Setup the subset of the package
@@ -80,8 +82,8 @@ RUN chmod 777 $GOPATH/buildInDocker.sh
8082
# Copy the rest of the source tree from this directory into the container
8183
# And make sure it's readable by the id that will run the compiles (not just root)
8284
ENV REPO="mq-golang"
83-
COPY . $GOPATH/src/$ORG/$REPO
84-
RUN chmod -R a+rx $GOPATH/src
85+
COPY --chmod=0777 . $GOPATH/src/$ORG/$REPO
86+
# RUN chmod -R a+rx $GOPATH/src
8587

8688
# Set the entrypoint to the script that will do the compilation
8789
ENTRYPOINT $GOPATH/buildInDocker.sh

ibmmq/cmqc_aix.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ package ibmmq
3030
****************************************************************
3131
*
3232
* <BEGIN_BUILDINFO>
33-
* Generated on: 2/7/23 5:13 PM
34-
* Build Level: p932-L230207
33+
* Generated on: 5/31/23 12:58 PM
34+
* Build Level: p933-L230531
3535
* Build Type: Production
3636
* <END_BUILDINFO>
3737
*/
@@ -1032,7 +1032,7 @@ const (
10321032
MQCMDI_SEC_SIGNOFF_ERROR int32 = 17
10331033
MQCMDI_SEC_TIMER_ZERO int32 = 14
10341034
MQCMDI_SEC_UPPERCASE int32 = 21
1035-
MQCMDL_CURRENT_LEVEL int32 = 932
1035+
MQCMDL_CURRENT_LEVEL int32 = 933
10361036
MQCMDL_LEVEL_1 int32 = 100
10371037
MQCMDL_LEVEL_101 int32 = 101
10381038
MQCMDL_LEVEL_110 int32 = 110
@@ -1082,6 +1082,7 @@ const (
10821082
MQCMDL_LEVEL_930 int32 = 930
10831083
MQCMDL_LEVEL_931 int32 = 931
10841084
MQCMDL_LEVEL_932 int32 = 932
1085+
MQCMDL_LEVEL_933 int32 = 933
10851086
MQCMD_ACCOUNTING_MQI int32 = 167
10861087
MQCMD_ACCOUNTING_Q int32 = 168
10871088
MQCMD_ACTIVITY_MSG int32 = 69

ibmmq/cmqc_darwin.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ package ibmmq
3030
****************************************************************
3131
*
3232
* <BEGIN_BUILDINFO>
33-
* Generated on: 2/7/23 5:13 PM
34-
* Build Level: p932-L230207
33+
* Generated on: 5/31/23 12:58 PM
34+
* Build Level: p933-L230531
3535
* Build Type: Production
3636
* <END_BUILDINFO>
3737
*/
@@ -1032,7 +1032,7 @@ const (
10321032
MQCMDI_SEC_SIGNOFF_ERROR int32 = 17
10331033
MQCMDI_SEC_TIMER_ZERO int32 = 14
10341034
MQCMDI_SEC_UPPERCASE int32 = 21
1035-
MQCMDL_CURRENT_LEVEL int32 = 932
1035+
MQCMDL_CURRENT_LEVEL int32 = 933
10361036
MQCMDL_LEVEL_1 int32 = 100
10371037
MQCMDL_LEVEL_101 int32 = 101
10381038
MQCMDL_LEVEL_110 int32 = 110
@@ -1082,6 +1082,7 @@ const (
10821082
MQCMDL_LEVEL_930 int32 = 930
10831083
MQCMDL_LEVEL_931 int32 = 931
10841084
MQCMDL_LEVEL_932 int32 = 932
1085+
MQCMDL_LEVEL_933 int32 = 933
10851086
MQCMD_ACCOUNTING_MQI int32 = 167
10861087
MQCMD_ACCOUNTING_Q int32 = 168
10871088
MQCMD_ACTIVITY_MSG int32 = 69

ibmmq/cmqc_linux_amd64.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ package ibmmq
3030
****************************************************************
3131
*
3232
* <BEGIN_BUILDINFO>
33-
* Generated on: 2/7/23 5:13 PM
34-
* Build Level: p932-L230207
33+
* Generated on: 5/31/23 12:58 PM
34+
* Build Level: p933-L230531
3535
* Build Type: Production
3636
* <END_BUILDINFO>
3737
*/
@@ -1032,7 +1032,7 @@ const (
10321032
MQCMDI_SEC_SIGNOFF_ERROR int32 = 17
10331033
MQCMDI_SEC_TIMER_ZERO int32 = 14
10341034
MQCMDI_SEC_UPPERCASE int32 = 21
1035-
MQCMDL_CURRENT_LEVEL int32 = 932
1035+
MQCMDL_CURRENT_LEVEL int32 = 933
10361036
MQCMDL_LEVEL_1 int32 = 100
10371037
MQCMDL_LEVEL_101 int32 = 101
10381038
MQCMDL_LEVEL_110 int32 = 110
@@ -1082,6 +1082,7 @@ const (
10821082
MQCMDL_LEVEL_930 int32 = 930
10831083
MQCMDL_LEVEL_931 int32 = 931
10841084
MQCMDL_LEVEL_932 int32 = 932
1085+
MQCMDL_LEVEL_933 int32 = 933
10851086
MQCMD_ACCOUNTING_MQI int32 = 167
10861087
MQCMD_ACCOUNTING_Q int32 = 168
10871088
MQCMD_ACTIVITY_MSG int32 = 69

ibmmq/cmqc_linux_ppc64le.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ package ibmmq
3030
****************************************************************
3131
*
3232
* <BEGIN_BUILDINFO>
33-
* Generated on: 2/7/23 5:13 PM
34-
* Build Level: p932-L230207
33+
* Generated on: 5/31/23 12:58 PM
34+
* Build Level: p933-L230531
3535
* Build Type: Production
3636
* <END_BUILDINFO>
3737
*/
@@ -1032,7 +1032,7 @@ const (
10321032
MQCMDI_SEC_SIGNOFF_ERROR int32 = 17
10331033
MQCMDI_SEC_TIMER_ZERO int32 = 14
10341034
MQCMDI_SEC_UPPERCASE int32 = 21
1035-
MQCMDL_CURRENT_LEVEL int32 = 932
1035+
MQCMDL_CURRENT_LEVEL int32 = 933
10361036
MQCMDL_LEVEL_1 int32 = 100
10371037
MQCMDL_LEVEL_101 int32 = 101
10381038
MQCMDL_LEVEL_110 int32 = 110
@@ -1082,6 +1082,7 @@ const (
10821082
MQCMDL_LEVEL_930 int32 = 930
10831083
MQCMDL_LEVEL_931 int32 = 931
10841084
MQCMDL_LEVEL_932 int32 = 932
1085+
MQCMDL_LEVEL_933 int32 = 933
10851086
MQCMD_ACCOUNTING_MQI int32 = 167
10861087
MQCMD_ACCOUNTING_Q int32 = 168
10871088
MQCMD_ACTIVITY_MSG int32 = 69

ibmmq/cmqc_linux_s390x.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ package ibmmq
3030
****************************************************************
3131
*
3232
* <BEGIN_BUILDINFO>
33-
* Generated on: 2/7/23 5:13 PM
34-
* Build Level: p932-L230207
33+
* Generated on: 5/31/23 12:58 PM
34+
* Build Level: p933-L230531
3535
* Build Type: Production
3636
* <END_BUILDINFO>
3737
*/
@@ -1032,7 +1032,7 @@ const (
10321032
MQCMDI_SEC_SIGNOFF_ERROR int32 = 17
10331033
MQCMDI_SEC_TIMER_ZERO int32 = 14
10341034
MQCMDI_SEC_UPPERCASE int32 = 21
1035-
MQCMDL_CURRENT_LEVEL int32 = 932
1035+
MQCMDL_CURRENT_LEVEL int32 = 933
10361036
MQCMDL_LEVEL_1 int32 = 100
10371037
MQCMDL_LEVEL_101 int32 = 101
10381038
MQCMDL_LEVEL_110 int32 = 110
@@ -1082,6 +1082,7 @@ const (
10821082
MQCMDL_LEVEL_930 int32 = 930
10831083
MQCMDL_LEVEL_931 int32 = 931
10841084
MQCMDL_LEVEL_932 int32 = 932
1085+
MQCMDL_LEVEL_933 int32 = 933
10851086
MQCMD_ACCOUNTING_MQI int32 = 167
10861087
MQCMD_ACCOUNTING_Q int32 = 168
10871088
MQCMD_ACTIVITY_MSG int32 = 69

ibmmq/cmqc_windows.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ package ibmmq
3030
****************************************************************
3131
*
3232
* <BEGIN_BUILDINFO>
33-
* Generated on: 2/7/23 5:13 PM
34-
* Build Level: p932-L230207
33+
* Generated on: 5/31/23 12:58 PM
34+
* Build Level: p933-L230531
3535
* Build Type: Production
3636
* <END_BUILDINFO>
3737
*/
@@ -1032,7 +1032,7 @@ const (
10321032
MQCMDI_SEC_SIGNOFF_ERROR int32 = 17
10331033
MQCMDI_SEC_TIMER_ZERO int32 = 14
10341034
MQCMDI_SEC_UPPERCASE int32 = 21
1035-
MQCMDL_CURRENT_LEVEL int32 = 932
1035+
MQCMDL_CURRENT_LEVEL int32 = 933
10361036
MQCMDL_LEVEL_1 int32 = 100
10371037
MQCMDL_LEVEL_101 int32 = 101
10381038
MQCMDL_LEVEL_110 int32 = 110
@@ -1082,6 +1082,7 @@ const (
10821082
MQCMDL_LEVEL_930 int32 = 930
10831083
MQCMDL_LEVEL_931 int32 = 931
10841084
MQCMDL_LEVEL_932 int32 = 932
1085+
MQCMDL_LEVEL_933 int32 = 933
10851086
MQCMD_ACCOUNTING_MQI int32 = 167
10861087
MQCMD_ACCOUNTING_Q int32 = 168
10871088
MQCMD_ACTIVITY_MSG int32 = 69

ibmmq/mqistr.go

+2
Original file line numberDiff line numberDiff line change
@@ -1457,6 +1457,8 @@ func MQItoString(class string, value int) string {
14571457
s = "MQCMDL_LEVEL_931"
14581458
case 932:
14591459
s = "MQCMDL_LEVEL_932"
1460+
case 933:
1461+
s = "MQCMDL_LEVEL_933"
14601462
default:
14611463
s = ""
14621464
}

mqmetric/channel.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ func collectChannelStatus(pattern string, instanceType int32) error {
355355
// Now get the responses - loop until all have been received (one
356356
// per channel) or we run out of time
357357
for allReceived := false; !allReceived; {
358-
cfh, buf, allReceived, err = statusGetReply()
358+
cfh, buf, allReceived, err = statusGetReply(putmqmd.MsgId)
359359
if buf != nil {
360360
key := parseChlData(instanceType, cfh, buf)
361361
if key != "" {
@@ -612,7 +612,7 @@ func inquireChannelAttributes(objectPatternsList string, infoMap map[string]*Obj
612612
}
613613

614614
for allReceived := false; !allReceived; {
615-
cfh, buf, allReceived, err = statusGetReply()
615+
cfh, buf, allReceived, err = statusGetReply(putmqmd.MsgId)
616616
if buf != nil {
617617
parseChannelAttrData(cfh, buf, infoMap)
618618
}

mqmetric/channelamqp.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ func collectAMQPChannelStatus(pattern string, instanceType int32) error {
255255
// Now get the responses - loop until all have been received (one
256256
// per channel) or we run out of time
257257
for allReceived := false; !allReceived; {
258-
cfh, buf, allReceived, err = statusGetReply()
258+
cfh, buf, allReceived, err = statusGetReply(putmqmd.MsgId)
259259
if buf != nil {
260260
key := parseAMQPChlData(instanceType, cfh, buf)
261261
if key != "" {
@@ -427,7 +427,7 @@ func inquireAMQPChannelAttributes(objectPatternsList string, infoMap map[string]
427427
}
428428

429429
for allReceived := false; !allReceived; {
430-
cfh, buf, allReceived, err = statusGetReply()
430+
cfh, buf, allReceived, err = statusGetReply(putmqmd.MsgId)
431431
if buf != nil {
432432
parseAMQPChannelAttrData(cfh, buf, infoMap)
433433
}

mqmetric/cluster.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ func collectClusterStatus() error {
130130
// Now get the responses - loop until all have been received (one
131131
// per queue) or we run out of time
132132
for allReceived := false; !allReceived; {
133-
cfh, buf, allReceived, err = statusGetReply()
133+
cfh, buf, allReceived, err = statusGetReply(putmqmd.MsgId)
134134
if buf != nil {
135135
parseClusterData(cfh, buf)
136136
}

mqmetric/globals.go

+2
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ type connectionInfo struct {
6363
discoveryDone bool
6464
publicationCount int
6565

66+
waitInterval int
67+
6668
objectStatus [OT_LAST_USED + 1]objectStatus
6769
publishedMetrics AllMetrics
6870
}

mqmetric/metrics.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ vary by queue manager platform and version.
88
As an example, one of the metrics available in Prometheus might be "ibmmq_channel_bytes_sent" with
99
the full name created by combining the product name, the class, and the individual metric.
1010

11-
The metrics published by the queue manager are listed in the product documentation are
11+
The metrics published by the queue manager are listed in the product documentation and
1212
are not repeated in this file:
1313
https://www.ibm.com/docs/en/ibm-mq/latest?topic=trace-metrics-published-system-topics
1414

@@ -119,4 +119,4 @@ Class: bufferpool/pageset
119119
ATTR_PS_TOTAL : pages_total
120120
ATTR_PS_UNUSED : pages_unused
121121

122-
This page was automatically generated from the source tree on 2023-02-15 07:35:57
122+
This page was automatically generated from the source tree on 2023-06-20 09:33:10

mqmetric/mqif.go

+8-5
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ type ConnectionConfig struct {
4747
ShowInactiveChannels bool
4848
HideSvrConnJobname bool
4949
HideAMQPClientId bool
50+
WaitInterval int
5051

5152
CcdtUrl string
5253
ConnName string
@@ -182,6 +183,7 @@ func initConnectionKey(key string, qMgrName string, replyQ string, replyQ2 strin
182183
var v map[int32]interface{}
183184

184185
ci.useStatus = cc.UseStatus
186+
ci.waitInterval = cc.WaitInterval
185187

186188
mqod := ibmmq.NewMQOD()
187189
openOptions := ibmmq.MQOO_INQUIRE + ibmmq.MQOO_FAIL_IF_QUIESCING
@@ -407,9 +409,10 @@ func subscribeDurable(topic string, pubQObj *ibmmq.MQObject) (*MQTopicDescriptor
407409
}
408410

409411
/*
410-
subscribe to the } else {
411-
s.removeSubscription()
412-
}nominated topic, but ask the queue manager to
412+
subscribe to the } else {
413+
s.removeSubscription()
414+
}nominated topic, but ask the queue manager to
415+
413416
allocate the replyQ for us
414417
*/
415418
func subscribeManaged(topic string, pubQObj *ibmmq.MQObject) (*MQTopicDescriptor, error) {
@@ -563,7 +566,7 @@ func clearDurableSubscriptions(prefix string, cmdQObj ibmmq.MQObject, replyQObj
563566
// Now get the responses - loop until all have been received (one
564567
// per queue) or we run out of time
565568
for allReceived := false; !allReceived; {
566-
cfh, buf, allReceived, err = statusGetReply()
569+
cfh, buf, allReceived, err = statusGetReply(putmqmd.MsgId)
567570
if buf != nil {
568571
subName, subId := parseInqSubData(cfh, buf)
569572
if subName != "" {
@@ -603,7 +606,7 @@ func clearDurableSubscriptions(prefix string, cmdQObj ibmmq.MQObject, replyQObj
603606
// Don't really care about the responses, just loop until
604607
// the operation is complete one way or the other
605608
for allReceived := false; !allReceived; {
606-
_, _, allReceived, _ = statusGetReply()
609+
_, _, allReceived, _ = statusGetReply(putmqmd.MsgId)
607610
}
608611
}
609612

mqmetric/qmgr.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ func collectQueueManagerListeners() error {
277277
// Now get the responses - loop until all have been received (one
278278
// per queue) or we run out of time
279279
for allReceived := false; !allReceived; {
280-
cfh, buf, allReceived, err = statusGetReply()
280+
cfh, buf, allReceived, err = statusGetReply(putmqmd.MsgId)
281281
if buf != nil {
282282
if parseQMgrListeners(cfh, buf) {
283283
listenerCount++
@@ -324,7 +324,7 @@ func collectQueueManagerStatus(instanceType int32) error {
324324
// Now get the responses - loop until all have been received (one
325325
// per queue) or we run out of time
326326
for allReceived := false; !allReceived; {
327-
cfh, buf, allReceived, err = statusGetReply()
327+
cfh, buf, allReceived, err = statusGetReply(putmqmd.MsgId)
328328
if buf != nil {
329329
parseQMgrData(instanceType, cfh, buf)
330330
}

mqmetric/queue.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ func collectQueueStatus(pattern string, instanceType int32) error {
260260
// Now get the responses - loop until all have been received (one
261261
// per queue) or we run out of time
262262
for allReceived := false; !allReceived; {
263-
cfh, buf, allReceived, err = statusGetReply()
263+
cfh, buf, allReceived, err = statusGetReply(putmqmd.MsgId)
264264
if buf != nil {
265265
parseQData(instanceType, cfh, buf)
266266
}
@@ -303,7 +303,7 @@ func collectResetQStats(pattern string) error {
303303
// Now get the responses - loop until all have been received (one
304304
// per queue) or we run out of time
305305
for allReceived := false; !allReceived; {
306-
cfh, buf, allReceived, err = statusGetReply()
306+
cfh, buf, allReceived, err = statusGetReply(putmqmd.MsgId)
307307
if buf != nil {
308308
parseResetQStatsData(cfh, buf)
309309
}
@@ -368,7 +368,7 @@ func inquireQueueAttributes(objectPatternsList string) error {
368368
}
369369

370370
for allReceived := false; !allReceived; {
371-
cfh, buf, allReceived, err = statusGetReply()
371+
cfh, buf, allReceived, err = statusGetReply(putmqmd.MsgId)
372372
if buf != nil {
373373
parseQAttrData(cfh, buf)
374374
}

0 commit comments

Comments
 (0)