Skip to content

Commit 5a108d4

Browse files
committed
Update for MQ 9.4.0. See CHANGELOG for more
1 parent 7608b1f commit 5a108d4

File tree

421 files changed

+24819
-37338
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

421 files changed

+24819
-37338
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
# Changelog
22
Newest updates are at the top of this file.
33

4+
### Jun 18 2024 (v5.6.0)
5+
* Update to MQ 9.4.0
6+
* Update all vendored dependencies
7+
* Add OTLP/http option to OTel emitter
8+
* Remove "EXPERIMENTAL" flag
9+
* Convert OTEL and Prometheus sample dashboards to newer Grafana panels
10+
* Update to Go 1.21 as baseline (OTEL requirement)
11+
* Permit connection to unnamed (default) queue manager
12+
413
### Mar 21 2024 (v5.5.4.1)
514
* Update main Dockerfile to use different base build image
615
because of glibc issues when copying into regular MQ container

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,21 @@ ARG EXPORTER=mq_prometheus
2020
# than that in the current MQ container image. And that causes the collector
2121
# to fail if layered into the MQ container.
2222
#
23-
# At least there is a golang 1.20 available for this level of ubuntu.
23+
# At least there is a golang 1.21 available for this level of ubuntu.
2424
FROM ubuntu:20.04 AS builder
2525

2626
ARG EXPORTER
2727
ENV EXPORTER=${EXPORTER} \
2828
ORG="github.com/ibm-messaging" \
2929
REPO="mq-metric-samples" \
30-
VRMF=9.3.5.0 \
30+
VRMF=9.4.0.0 \
3131
CGO_CFLAGS="-I/opt/mqm/inc/" \
3232
CGO_LDFLAGS_ALLOW="-Wl,-rpath.*" \
3333
genmqpkg_incnls=1 \
3434
genmqpkg_incsdk=1 \
3535
genmqpkg_inctls=1
3636

37-
ENV GOVERSION=1.20
37+
ENV GOVERSION=1.21
3838

3939
# Install packages
4040
RUN apt-get update \
@@ -130,7 +130,7 @@ RUN buildStamp=`date +%Y%m%d-%H%M%S`; \
130130
# --- --- --- --- --- --- --- --- --- --- --- --- --- --- #
131131
### ### ### ### ### ### ### RUN ### ### ### ### ### ### ###
132132
# --- --- --- --- --- --- --- --- --- --- --- --- --- --- #
133-
FROM golang:1.20 AS runtime
133+
FROM golang:1.21 AS runtime
134134

135135
ARG EXPORTER
136136

Dockerfile.build

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,12 @@ ARG BASE_IMAGE=ubuntu:20.04
1616
FROM $BASE_IMAGE
1717

1818
ARG GOPATH_ARG="/go"
19-
ARG GOVERSION=1.20
19+
ARG GOVERSION=1.21
2020
ARG GOARCH=amd64
2121
ARG MQARCH=X64
2222

2323
ENV GOVERSION=${GOVERSION} \
2424
GOPATH=$GOPATH_ARG \
25-
GOTAR=go${GOVERSION}.linux-${GOARCH}.tar.gz \
2625
ORG="github.com/ibm-messaging"
2726

2827

@@ -43,25 +42,25 @@ RUN export DEBIAN_FRONTEND=noninteractive \
4342
tar \
4443
bash \
4544
build-essential \
45+
golang-$GOVERSION \
4646
&& rm -rf /var/lib/apt/lists/*
4747

48+
ENV GO=/usr/lib/go-${GOVERSION}/bin/go
49+
RUN $GO version
4850

4951
# Create location for the git clone and MQ installation
5052
RUN mkdir -p $GOPATH/src $GOPATH/bin $GOPATH/pkg \
5153
&& chmod -R 777 $GOPATH \
5254
&& mkdir -p $GOPATH/src/$ORG \
5355
&& cd /tmp \
54-
&& wget -nv https://dl.google.com/go/${GOTAR} \
55-
&& tar -xf ${GOTAR} \
56-
&& mv go /usr/lib/go-${GOVERSION} \
57-
&& rm -f ${GOTAR} \
5856
&& mkdir -p /opt/mqm \
5957
&& chmod a+rx /opt/mqm
6058

59+
6160
# Location of the downloadable MQ client package \
6261
ENV RDURL="https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist" \
6362
RDTAR="IBM-MQC-Redist-Linux${MQARCH}.tar.gz" \
64-
VRMF=9.3.5.0
63+
VRMF=9.4.0.0
6564

6665
# Install the MQ client from the Redistributable package. This also contains the
6766
# header files we need to compile against. Setup the subset of the package

Dockerfile.run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ RUN apt-get update \
3434
# Location of the downloadable MQ client package \
3535
ENV RDURL="https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist" \
3636
RDTAR="IBM-MQC-Redist-Linux${MQARCH}.tar.gz" \
37-
VRMF=9.3.5.0
37+
VRMF=9.4.0.0
3838

3939
# Install the MQ client from the Redistributable package. This also contains the
4040
# header files we need to compile against. Setup the subset of the package

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ repository. They are referenced in the `go.mod` file if you wish to reload all o
2828

2929
You will require the following programs:
3030

31-
* Go compiler - version 1.20 is the minimum defined here
31+
* Go compiler - version 1.21 is the minimum defined here
3232
* C compiler
3333

3434
### MQ Client SDK

cmd/mq_aws/main.go

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,14 @@ func main() {
4242

4343
err = initConfig()
4444

45-
if err == nil && config.cf.QMgrName == "" {
46-
log.Errorln("Must provide a queue manager name to connect to.")
47-
os.Exit(72)
48-
}
45+
// The qmgr name is permitted to be blank or asterisk to connect to a default qmgr
4946

47+
/*
48+
if err == nil && config.cf.QMgrName == "" {
49+
log.Errorln("Must provide a queue manager name to connect to.")
50+
os.Exit(72)
51+
}
52+
*/
5053
if err == nil {
5154
interval := config.ci.Interval
5255
d, err = time.ParseDuration(interval)
@@ -59,6 +62,11 @@ func main() {
5962
err = mqmetric.InitConnection(config.cf.QMgrName, config.cf.ReplyQ, config.cf.ReplyQ2, &config.cf.CC)
6063
}
6164
if err == nil {
65+
if config.cf.QMgrName == "" || strings.HasPrefix(config.cf.QMgrName, "*") {
66+
qmName := mqmetric.GetResolvedQMgrName()
67+
log.Infoln("Resolving blank/default qmgr name to ", qmName)
68+
config.cf.QMgrName = qmName
69+
}
6270
log.Infoln("Connected to queue manager ", config.cf.QMgrName)
6371
} else {
6472
if mqe, ok := err.(mqmetric.MQMetricError); ok {

cmd/mq_coll/main.go

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,13 @@ func main() {
4242

4343
err = initConfig()
4444

45-
if err == nil && config.cf.QMgrName == "" {
46-
log.Errorln("Must provide a queue manager name to connect to.")
47-
os.Exit(72)
48-
}
45+
// The qmgr name is permitted to be blank or asterisk to connect to a default qmgr
46+
/*
47+
if err == nil && config.cf.QMgrName == "" {
48+
log.Errorln("Must provide a queue manager name to connect to.")
49+
os.Exit(72)
50+
}
51+
*/
4952
if err == nil {
5053
d, err = time.ParseDuration(config.interval)
5154
if err != nil || d.Seconds() <= 1 {
@@ -57,6 +60,11 @@ func main() {
5760
err = mqmetric.InitConnection(config.cf.QMgrName, config.cf.ReplyQ, config.cf.ReplyQ2, &config.cf.CC)
5861
}
5962
if err == nil {
63+
if config.cf.QMgrName == "" || strings.HasPrefix(config.cf.QMgrName, "*") {
64+
qmName := mqmetric.GetResolvedQMgrName()
65+
log.Infoln("Resolving blank/default qmgr name to ", qmName)
66+
config.cf.QMgrName = qmName
67+
}
6068
log.Infoln("Connected to queue manager ", config.cf.QMgrName)
6169
} else {
6270
if mqe, ok := err.(mqmetric.MQMetricError); ok {

cmd/mq_influx/main.go

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,13 @@ func main() {
4545
cf.PrintInfo("IBM MQ metrics exporter for InfluxDB monitoring", BuildStamp, GitCommit, BuildPlatform)
4646

4747
err = initConfig()
48-
49-
if err == nil && config.cf.QMgrName == "" {
50-
log.Errorln("Must provide a queue manager name to connect to.")
51-
os.Exit(72)
52-
}
48+
// The qmgr name is permitted to be blank or asterisk to connect to a default qmgr
49+
/*
50+
if err == nil && config.cf.QMgrName == "" {
51+
log.Errorln("Must provide a queue manager name to connect to.")
52+
os.Exit(72)
53+
}
54+
*/
5355
if err == nil {
5456
d, err = time.ParseDuration(config.ci.Interval)
5557
if err != nil || d.Seconds() <= 1 {
@@ -61,6 +63,11 @@ func main() {
6163
err = mqmetric.InitConnection(config.cf.QMgrName, config.cf.ReplyQ, config.cf.ReplyQ2, &config.cf.CC)
6264
}
6365
if err == nil {
66+
if config.cf.QMgrName == "" || strings.HasPrefix(config.cf.QMgrName, "*") {
67+
qmName := mqmetric.GetResolvedQMgrName()
68+
log.Infoln("Resolving blank/default qmgr name to ", qmName)
69+
config.cf.QMgrName = qmName
70+
}
6471
log.Infoln("Connected to queue manager ", config.cf.QMgrName)
6572
} else {
6673
if mqe, ok := err.(mqmetric.MQMetricError); ok {

cmd/mq_json/main.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ func main() {
8181
}
8282

8383
if err == nil {
84+
if config.cf.QMgrName == "" || strings.HasPrefix(config.cf.QMgrName, "*") {
85+
qmName := mqmetric.GetResolvedQMgrName()
86+
log.Infoln("Resolving blank/default qmgr name to ", qmName)
87+
config.cf.QMgrName = qmName
88+
}
8489
log.Infoln("Connected to queue manager ", config.cf.QMgrName)
8590
} else {
8691
if mqe, ok := err.(mqmetric.MQMetricError); ok {

cmd/mq_opentsdb/main.go

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,13 @@ func main() {
4141
cf.PrintInfo("IBM MQ metrics exporter for OpenTSDB monitoring", BuildStamp, GitCommit, BuildPlatform)
4242

4343
err = initConfig()
44-
45-
if err == nil && config.cf.QMgrName == "" {
46-
log.Errorln("Must provide a queue manager name to connect to.")
47-
os.Exit(72)
48-
}
49-
44+
// The qmgr name is permitted to be blank or asterisk to connect to a default qmgr
45+
/*
46+
if err == nil && config.cf.QMgrName == "" {
47+
log.Errorln("Must provide a queue manager name to connect to.")
48+
os.Exit(72)
49+
}
50+
*/
5051
if err == nil {
5152
interval := config.ci.Interval
5253
if !strings.HasSuffix(interval, "s") {
@@ -62,6 +63,11 @@ func main() {
6263
err = mqmetric.InitConnection(config.cf.QMgrName, config.cf.ReplyQ, config.cf.ReplyQ2, &config.cf.CC)
6364
}
6465
if err == nil {
66+
if config.cf.QMgrName == "" || strings.HasPrefix(config.cf.QMgrName, "*") {
67+
qmName := mqmetric.GetResolvedQMgrName()
68+
log.Infoln("Resolving blank/default qmgr name to ", qmName)
69+
config.cf.QMgrName = qmName
70+
}
6571
log.Infoln("Connected to queue manager ", config.cf.QMgrName)
6672
} else {
6773
if mqe, ok := err.(mqmetric.MQMetricError); ok {

0 commit comments

Comments
 (0)