Skip to content

Commit c3d53bf

Browse files
committed
* Update to MQ 9.3.2
* Add hostname tag for qmgrs running 9.3.2 * Add NativeHA metrics to all collectors
1 parent c242187 commit c3d53bf

Some content is hidden

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

50 files changed

+2069
-258
lines changed

CHANGELOG.md

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

4+
### Feb 17 2023 (v5.4.0)
5+
* Update to MQ 9.3.2
6+
* Add hostname tag for qmgrs running 9.3.2
7+
* Add NativeHA metrics to all collectors
8+
49
### Jan 10 2023 (v5.3.3)
510
* Copy in metrics.txt summary of available metrics from mq-golang
611
* JSON exporter - consistent objecttype for qmgr, merge published and

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ ARG EXPORTER
6161
ENV EXPORTER=${EXPORTER} \
6262
RDURL="https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist" \
6363
RDTAR="IBM-MQC-Redist-LinuxX64.tar.gz" \
64-
VRMF=9.3.1.0 \
64+
VRMF=9.3.2.0 \
6565
genmqpkg_incnls=1 \
6666
genmqpkg_incsdk=1 \
6767
genmqpkg_inctls=1 \

Dockerfile.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ RUN mkdir -p $GOPATH/src $GOPATH/bin $GOPATH/pkg \
5959
# Location of the downloadable MQ client package \
6060
ENV RDURL="https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist" \
6161
RDTAR="IBM-MQC-Redist-LinuxX64.tar.gz" \
62-
VRMF=9.3.1.0
62+
VRMF=9.3.2.0
6363

6464
# Install the MQ client from the Redistributable package. This also contains the
6565
# 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
@@ -31,7 +31,7 @@ RUN apt-get update \
3131
# Location of the downloadable MQ client package \
3232
ENV RDURL="https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist" \
3333
RDTAR="IBM-MQC-Redist-LinuxX64.tar.gz" \
34-
VRMF=9.3.1.0
34+
VRMF=9.3.2.0
3535

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

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,17 @@ only shows channels with a known state and does not report on inactive channels.
215215
To also see the inactive channels, then set the showInactiveChannels
216216
configuration attribute to true.
217217

218+
### NativeHA
219+
When NativeHA is used, the queue manager publishes some metrics on its status. These
220+
are automatically collected whenever available, and can be seen in the metric lists. The metrics
221+
are given a prefix or series of "nha". For example, `ibmmq_nha_synchronous_log_sent_bytes` is one
222+
metric shown in Prometheus. The NativeHA "instance" - the names given to the replicas - is added
223+
as the `nhainstance` tag to the metrics.
224+
225+
Depending on configuration, the collector may be able to automatically reconnect to the new instance
226+
after a failover. If that is not possible, you will need to have a process to restart the collector
227+
once the new replica has taken over.
228+
218229
### z/OS Support
219230
Because the DIS QSTATUS and DIS CHSTATUS commands can be used on z/OS, the monitors
220231
support showing some information from a z/OS queue manager. There is nothing special needed to configure it, beyond the client

cmd/mq_aws/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ The example Grafana dashboard shows how queries can be constructed to extract da
6363
about specific queues or the queue manager.
6464

6565
More information on the metrics collected through the publish/subscribe
66-
interface can be found in the [MQ KnowledgeCenter](https://www.ibm.com/support/knowledgecenter/SSFKSJ_latest/com.ibm.mq.mon.doc/mo00013_.htm)
66+
interface can be found in the [MQ KnowledgeCenter](https://www.ibm.com/docs/en/ibm-mq/latest?topic=trace-metrics-published-system-topics)
6767
with further description in [an MQDev blog entry](https://community.ibm.com/community/user/integration/viewdocument/statistics-published-to-the-system?CommunityKey=183ec850-4947-49c8-9a2e-8e7c7fc46c64&tab=librarydocuments)
6868

6969
The metrics stored in the database are named after the

cmd/mq_aws/exporter.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,13 @@ func Collect() error {
247247
series = "qmgr"
248248
if key == mqmetric.QMgrMapKey {
249249
tags["description"] = mqmetric.GetObjectDescription("", ibmmq.MQOT_Q_MGR)
250+
hostname := mqmetric.GetQueueManagerAttribute(config.cf.QMgrName, ibmmq.MQCACF_HOST_NAME)
251+
if hostname != mqmetric.DUMMY_STRING {
252+
tags["hostname"] = hostname
253+
}
254+
} else if strings.HasPrefix(key, mqmetric.NativeHAKeyPrefix) {
255+
series = "nha"
256+
tags["nhainstance"] = strings.Replace(key, mqmetric.NativeHAKeyPrefix, "", -1)
250257
} else {
251258
tags["queue"] = key
252259
series = "queue"
@@ -458,6 +465,11 @@ func Collect() error {
458465
"description": mqmetric.GetObjectDescription("", ibmmq.MQOT_Q_MGR),
459466
}
460467

468+
hostname := mqmetric.GetQueueManagerAttribute(config.cf.QMgrName, ibmmq.MQCACF_HOST_NAME)
469+
if hostname != mqmetric.DUMMY_STRING {
470+
tags["hostname"] = hostname
471+
}
472+
461473
f := mqmetric.QueueManagerNormalise(attr, value.ValueInt64)
462474

463475
pt, _ := newPoint(series+"."+attr.MetricName, t, float64(f), tags)

cmd/mq_coll/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ The example Grafana dashboard shows how queries can be constructed to extract da
5555
about specific queues or the queue manager.
5656

5757
More information on the metrics collected through the publish/subscribe
58-
interface can be found in the [MQ KnowledgeCenter](https://www.ibm.com/support/knowledgecenter/SSFKSJ_latest/com.ibm.mq.mon.doc/mo00013_.htm)
58+
interface can be found in the [MQ KnowledgeCenter](https://www.ibm.com/docs/en/ibm-mq/latest?topic=trace-metrics-published-system-topics)
5959
with further description in [an MQDev blog entry](https://community.ibm.com/community/user/integration/viewdocument/statistics-published-to-the-system?CommunityKey=183ec850-4947-49c8-9a2e-8e7c7fc46c64&tab=librarydocuments)
6060

6161
The metrics stored in the database are named after the

cmd/mq_coll/exporter.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,13 @@ func Collect() error {
202202
series = "qmgr"
203203
if key == mqmetric.QMgrMapKey {
204204
tags["description"] = mqmetric.GetObjectDescription("", ibmmq.MQOT_Q_MGR)
205-
205+
hostname := mqmetric.GetQueueManagerAttribute(config.cf.QMgrName, ibmmq.MQCACF_HOST_NAME)
206+
if hostname != mqmetric.DUMMY_STRING {
207+
tags["hostname"] = hostname
208+
}
209+
} else if strings.HasPrefix(key, mqmetric.NativeHAKeyPrefix) {
210+
series = "nha"
211+
tags["nhainstance"] = strings.Replace(key, mqmetric.NativeHAKeyPrefix, "", -1)
206212
} else {
207213
series = "queue"
208214
tags[series] = key
@@ -372,6 +378,10 @@ func Collect() error {
372378
"platform": platformString,
373379
"description": mqmetric.GetObjectDescription("", ibmmq.MQOT_Q_MGR),
374380
}
381+
hostname := mqmetric.GetQueueManagerAttribute(config.cf.QMgrName, ibmmq.MQCACF_HOST_NAME)
382+
if hostname != mqmetric.DUMMY_STRING {
383+
tags["hostname"] = hostname
384+
}
375385

376386
f := mqmetric.QueueManagerNormalise(attr, value.ValueInt64)
377387
printPoint(series, attr.MetricName, float32(f), tags)

cmd/mq_influx/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ The example Grafana dashboard shows how queries can be constructed to extract da
6363
about specific objects or the queue manager.
6464

6565
More information on the metrics collected through the publish/subscribe
66-
interface can be found in the [MQ KnowledgeCenter](https://www.ibm.com/support/knowledgecenter/SSFKSJ_latest/com.ibm.mq.mon.doc/mo00013_.htm)
66+
interface can be found in the [MQ KnowledgeCenter](https://www.ibm.com/docs/en/ibm-mq/latest?topic=trace-metrics-published-system-topics)
6767
with further description in [an MQDev blog entry](https://community.ibm.com/community/user/integration/viewdocument/statistics-published-to-the-system?CommunityKey=183ec850-4947-49c8-9a2e-8e7c7fc46c64&tab=librarydocuments)
6868

6969
The metrics stored in the Influx database are named after the

0 commit comments

Comments
 (0)