Skip to content

Commit

Permalink
Update for MQ 9.4.0. See CHANGELOG for more
Browse files Browse the repository at this point in the history
  • Loading branch information
ibmmqmet committed Jun 18, 2024
1 parent 7608b1f commit 5a108d4
Show file tree
Hide file tree
Showing 421 changed files with 24,819 additions and 37,338 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# Changelog
Newest updates are at the top of this file.

### Jun 18 2024 (v5.6.0)
* Update to MQ 9.4.0
* Update all vendored dependencies
* Add OTLP/http option to OTel emitter
* Remove "EXPERIMENTAL" flag
* Convert OTEL and Prometheus sample dashboards to newer Grafana panels
* Update to Go 1.21 as baseline (OTEL requirement)
* Permit connection to unnamed (default) queue manager

### Mar 21 2024 (v5.5.4.1)
* Update main Dockerfile to use different base build image
because of glibc issues when copying into regular MQ container
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ ARG EXPORTER=mq_prometheus
# than that in the current MQ container image. And that causes the collector
# to fail if layered into the MQ container.
#
# At least there is a golang 1.20 available for this level of ubuntu.
# At least there is a golang 1.21 available for this level of ubuntu.
FROM ubuntu:20.04 AS builder

ARG EXPORTER
ENV EXPORTER=${EXPORTER} \
ORG="github.com/ibm-messaging" \
REPO="mq-metric-samples" \
VRMF=9.3.5.0 \
VRMF=9.4.0.0 \
CGO_CFLAGS="-I/opt/mqm/inc/" \
CGO_LDFLAGS_ALLOW="-Wl,-rpath.*" \
genmqpkg_incnls=1 \
genmqpkg_incsdk=1 \
genmqpkg_inctls=1

ENV GOVERSION=1.20
ENV GOVERSION=1.21

# Install packages
RUN apt-get update \
Expand Down Expand Up @@ -130,7 +130,7 @@ RUN buildStamp=`date +%Y%m%d-%H%M%S`; \
# --- --- --- --- --- --- --- --- --- --- --- --- --- --- #
### ### ### ### ### ### ### RUN ### ### ### ### ### ### ###
# --- --- --- --- --- --- --- --- --- --- --- --- --- --- #
FROM golang:1.20 AS runtime
FROM golang:1.21 AS runtime

ARG EXPORTER

Expand Down
13 changes: 6 additions & 7 deletions Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@ ARG BASE_IMAGE=ubuntu:20.04
FROM $BASE_IMAGE

ARG GOPATH_ARG="/go"
ARG GOVERSION=1.20
ARG GOVERSION=1.21
ARG GOARCH=amd64
ARG MQARCH=X64

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


Expand All @@ -43,25 +42,25 @@ RUN export DEBIAN_FRONTEND=noninteractive \
tar \
bash \
build-essential \
golang-$GOVERSION \
&& rm -rf /var/lib/apt/lists/*

ENV GO=/usr/lib/go-${GOVERSION}/bin/go
RUN $GO version

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


# 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
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.run
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ RUN apt-get update \
# 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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ repository. They are referenced in the `go.mod` file if you wish to reload all o

You will require the following programs:

* Go compiler - version 1.20 is the minimum defined here
* Go compiler - version 1.21 is the minimum defined here
* C compiler

### MQ Client SDK
Expand Down
16 changes: 12 additions & 4 deletions cmd/mq_aws/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,14 @@ func main() {

err = initConfig()

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

/*
if err == nil && config.cf.QMgrName == "" {
log.Errorln("Must provide a queue manager name to connect to.")
os.Exit(72)
}
*/
if err == nil {
interval := config.ci.Interval
d, err = time.ParseDuration(interval)
Expand All @@ -59,6 +62,11 @@ func main() {
err = mqmetric.InitConnection(config.cf.QMgrName, config.cf.ReplyQ, config.cf.ReplyQ2, &config.cf.CC)
}
if err == nil {
if config.cf.QMgrName == "" || strings.HasPrefix(config.cf.QMgrName, "*") {
qmName := mqmetric.GetResolvedQMgrName()
log.Infoln("Resolving blank/default qmgr name to ", qmName)
config.cf.QMgrName = qmName
}
log.Infoln("Connected to queue manager ", config.cf.QMgrName)
} else {
if mqe, ok := err.(mqmetric.MQMetricError); ok {
Expand Down
16 changes: 12 additions & 4 deletions cmd/mq_coll/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,13 @@ func main() {

err = initConfig()

if err == nil && config.cf.QMgrName == "" {
log.Errorln("Must provide a queue manager name to connect to.")
os.Exit(72)
}
// The qmgr name is permitted to be blank or asterisk to connect to a default qmgr
/*
if err == nil && config.cf.QMgrName == "" {
log.Errorln("Must provide a queue manager name to connect to.")
os.Exit(72)
}
*/
if err == nil {
d, err = time.ParseDuration(config.interval)
if err != nil || d.Seconds() <= 1 {
Expand All @@ -57,6 +60,11 @@ func main() {
err = mqmetric.InitConnection(config.cf.QMgrName, config.cf.ReplyQ, config.cf.ReplyQ2, &config.cf.CC)
}
if err == nil {
if config.cf.QMgrName == "" || strings.HasPrefix(config.cf.QMgrName, "*") {
qmName := mqmetric.GetResolvedQMgrName()
log.Infoln("Resolving blank/default qmgr name to ", qmName)
config.cf.QMgrName = qmName
}
log.Infoln("Connected to queue manager ", config.cf.QMgrName)
} else {
if mqe, ok := err.(mqmetric.MQMetricError); ok {
Expand Down
17 changes: 12 additions & 5 deletions cmd/mq_influx/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,13 @@ func main() {
cf.PrintInfo("IBM MQ metrics exporter for InfluxDB monitoring", BuildStamp, GitCommit, BuildPlatform)

err = initConfig()

if err == nil && config.cf.QMgrName == "" {
log.Errorln("Must provide a queue manager name to connect to.")
os.Exit(72)
}
// The qmgr name is permitted to be blank or asterisk to connect to a default qmgr
/*
if err == nil && config.cf.QMgrName == "" {
log.Errorln("Must provide a queue manager name to connect to.")
os.Exit(72)
}
*/
if err == nil {
d, err = time.ParseDuration(config.ci.Interval)
if err != nil || d.Seconds() <= 1 {
Expand All @@ -61,6 +63,11 @@ func main() {
err = mqmetric.InitConnection(config.cf.QMgrName, config.cf.ReplyQ, config.cf.ReplyQ2, &config.cf.CC)
}
if err == nil {
if config.cf.QMgrName == "" || strings.HasPrefix(config.cf.QMgrName, "*") {
qmName := mqmetric.GetResolvedQMgrName()
log.Infoln("Resolving blank/default qmgr name to ", qmName)
config.cf.QMgrName = qmName
}
log.Infoln("Connected to queue manager ", config.cf.QMgrName)
} else {
if mqe, ok := err.(mqmetric.MQMetricError); ok {
Expand Down
5 changes: 5 additions & 0 deletions cmd/mq_json/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ func main() {
}

if err == nil {
if config.cf.QMgrName == "" || strings.HasPrefix(config.cf.QMgrName, "*") {
qmName := mqmetric.GetResolvedQMgrName()
log.Infoln("Resolving blank/default qmgr name to ", qmName)
config.cf.QMgrName = qmName
}
log.Infoln("Connected to queue manager ", config.cf.QMgrName)
} else {
if mqe, ok := err.(mqmetric.MQMetricError); ok {
Expand Down
18 changes: 12 additions & 6 deletions cmd/mq_opentsdb/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@ func main() {
cf.PrintInfo("IBM MQ metrics exporter for OpenTSDB monitoring", BuildStamp, GitCommit, BuildPlatform)

err = initConfig()

if err == nil && config.cf.QMgrName == "" {
log.Errorln("Must provide a queue manager name to connect to.")
os.Exit(72)
}

// The qmgr name is permitted to be blank or asterisk to connect to a default qmgr
/*
if err == nil && config.cf.QMgrName == "" {
log.Errorln("Must provide a queue manager name to connect to.")
os.Exit(72)
}
*/
if err == nil {
interval := config.ci.Interval
if !strings.HasSuffix(interval, "s") {
Expand All @@ -62,6 +63,11 @@ func main() {
err = mqmetric.InitConnection(config.cf.QMgrName, config.cf.ReplyQ, config.cf.ReplyQ2, &config.cf.CC)
}
if err == nil {
if config.cf.QMgrName == "" || strings.HasPrefix(config.cf.QMgrName, "*") {
qmName := mqmetric.GetResolvedQMgrName()
log.Infoln("Resolving blank/default qmgr name to ", qmName)
config.cf.QMgrName = qmName
}
log.Infoln("Connected to queue manager ", config.cf.QMgrName)
} else {
if mqe, ok := err.(mqmetric.MQMetricError); ok {
Expand Down
Loading

0 comments on commit 5a108d4

Please sign in to comment.