Skip to content

Commit 01ff5f1

Browse files
committed
Update to use MQ 9.3.0.0 and mq-golang v5.3.0
1 parent 5b885e7 commit 01ff5f1

Some content is hidden

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

74 files changed

+2213
-729
lines changed

CHANGELOG.md

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

4+
### Jun 23 2022 (v5.3.0)
5+
* Update to MQ 9.3.0
6+
* Update to use v5.3.0 of mq-golang repository
7+
* Update other vendored dependencies
8+
* Add filters.hideSvrConnJobname config option (#114)
9+
* Move objects.showInactiveChannels to new filters section (generate error to indicate move)
10+
- Move objects.queueSubscriptionSelection to new filters section
11+
* Enable use of durable subscriptions to reduce impact on MAXHANDS configuration
12+
* Add script to explicitly remove durable subs
13+
414
### Mar 10 2022 (no new version)
515
* Add CP4I helm charts to deploy MQ metric samples application in OCP environment.
616

717
### Mar 02 2022 (no new version)
818
* Add dspmqrtj application and demo
919

1020
### Feb 28 2022 (no new version)
11-
* Update to require Go 1.17
21+
* Update to require Go 1.17 because of influxdb prereq changes
1222

1323
### Feb 25 2022 (v5.2.5)
1424
* Update to MQ 9.2.5

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.2.5.0
62+
VRMF=9.3.0.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.2.5.0
34+
VRMF=9.3.0.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: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ dashboard and historic reporting.
1010
## The dspmqrtj program
1111
The repository also includes a program which traces the route a message can
1212
take through the MQ network. It is similar to the `dspmqrte` program that is
13-
part of the MQ product, but writes the output in JSON format. See
13+
part of the MQ product, but writes the output in JSON format. See
1414
the `dspmqrtj` subdirectory for more information.
1515

1616
## Health Warning
@@ -30,7 +30,8 @@ file if you wish to reload all of the dependencies by running `go mod vendor`.
3030

3131
You will require the following programs:
3232

33-
* Go compiler. This should be at least version 17.
33+
* Go compiler. Building the InfluxDB collector requires Go 17 as the minimum compiler level. If you don't want
34+
to build that particular collector then older levels can be used.
3435

3536
To build the programs on Linux and MacOS, you may set an environment variable to permit some compile/link flags.
3637
This is due to security controls in the compiler.
@@ -87,9 +88,10 @@ builds all the collectors and corresponding YAML configuration files into %GOPAT
8788
## Queue manager configuration
8889
When metrics are being collected from the publish/subscribe interface (all platforms except z/OS),
8990
there are some considerations:
90-
* MAXHANDS on queue manager: Each subscription uses an object handle. If many queues are being monitored
91+
* MAXHANDS on queue manager: The default configuration of these collectors uses non-durable subscriptions to get
92+
information about queue metrics. Each subscription uses an object handle. If many queues are being monitored
9193
the default MAXHANDS may need to be increased. A warning is printed if the monitor thinks this attribute
92-
appears too low.
94+
appears too low. See below for an alternative option.
9395
* MAXDEPTH on model queues: The model queue used as the basis for publication and reply queues in the
9496
monitor must have a MAXDEPTH suitable for the expected amount of data. For published metrics, this is
9597
estimated based on holding one minute's amount of publications; the number of monitored channels is also
@@ -99,6 +101,24 @@ monitor.
99101
SYSTEM.ADMIN.TOPIC) determines what happens if the subscriber's queue is full. You might prefer to set this to
100102
NO to avoid filling the system DLQ if the collection program does not read the publications frequently enough.
101103

104+
105+
### Using durable subscriptions
106+
An alternative collection mechanism uses durable subscriptions for the queue metric data. This may avoid needing to increase
107+
the MAXHANDS attribute on a queue manager. (Queue manager-level metrics are still collected using non-durable subscriptions.)
108+
109+
To set it up, you must provide suitable configuration options. In the
110+
YAML configuration, these are the attributes (command line or environment variable equivalents exist):
111+
- `replyQueue` must refer to a local queue (not a model queue)
112+
- `replyQueue2` must also be set, referring to a different local queue
113+
- `durableSubPrefix` is a string that is unique across any collectors that might be connected to this queue manager
114+
115+
If you use durable subscriptions, then the named reply queues may continue to receive publications even when the
116+
collector is not running, so that may induce queue-full reports in the error log or events. The subscriptions can
117+
be manually removed using the "DELETE SUB()" MQSC command for all subscriptions where the subscription ids begin with the
118+
`durableSubPrefix` value. The `scripts/cleanDur.sh` program can be used for this deletion. You should also clean
119+
the subscriptions when the configuration of which data to collect has changed, particularly the `queueSubscriptionSelector`
120+
option.
121+
102122
## Monitor configuration
103123
The monitors always collect all of the available queue manager-wide metrics.
104124
They can also be configured to collect statistics for specific sets of queues where
@@ -229,7 +249,8 @@ All of the exporters support
229249
the same configuration options for how to connect to MQ and which objects are monitored. There is
230250
then an exporter-specific section for additional configuration such as how to contact the back-end
231251
database.
232-
The common options are shown in a template in this directory; the exporter-specific options are in individual files in each directory. Combine the two pieces into a single file to get a complete deployable configuration.
252+
The common options are shown in a template in this directory; the exporter-specific options are in individual
253+
files in each directory. Combine the two pieces into a single file to get a complete deployable configuration.
233254

234255
Unlike the command line flags, lists are provided in a more natural format instead of comma-separated
235256
values in a single string. If an option is provided on both the command line and in the file, it is the file

cmd/mq_aws/config.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ type mqExporterConfigYaml struct {
4141
Global cf.ConfigYGlobal
4242
Connection cf.ConfigYConnection
4343
Objects cf.ConfigYObjects
44+
Filters cf.ConfigYFilters
4445
Cloudwatch ConfigYCloudwatch `yaml:"cloudwatch"`
4546
}
4647

@@ -69,7 +70,7 @@ func initConfig() error {
6970
if config.cf.ConfigFile != "" {
7071
err = cf.ReadConfigFile(config.cf.ConfigFile, &cfy)
7172
if err == nil {
72-
cf.CopyYamlConfig(&config.cf, cfy.Global, cfy.Connection, cfy.Objects)
73+
cf.CopyYamlConfig(&config.cf, cfy.Global, cfy.Connection, cfy.Objects, cfy.Filters)
7374
config.ci.Region = cf.CopyParmIfNotSetStr("cloudwatch", "awsregion", cfy.Cloudwatch.Region)
7475
config.ci.Namespace = cf.CopyParmIfNotSetStr("cloudwatch", "namespace", cfy.Cloudwatch.Namespace)
7576

cmd/mq_coll/config.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ type mqExporterConfigYaml struct {
4040
Global cf.ConfigYGlobal
4141
Connection cf.ConfigYConnection
4242
Objects cf.ConfigYObjects
43+
Filters cf.ConfigYFilters
4344
Collectd ConfigYColl `yaml:"collectd"`
4445
}
4546

@@ -62,7 +63,7 @@ func initConfig() error {
6263
if config.cf.ConfigFile != "" {
6364
err = cf.ReadConfigFile(config.cf.ConfigFile, &cfy)
6465
if err == nil {
65-
cf.CopyYamlConfig(&config.cf, cfy.Global, cfy.Connection, cfy.Objects)
66+
cf.CopyYamlConfig(&config.cf, cfy.Global, cfy.Connection, cfy.Objects, cfy.Filters)
6667
config.interval = cf.CopyParmIfNotSetStr("collectd", "interval", cfy.Collectd.Interval)
6768
config.hostname = cf.CopyParmIfNotSetStr("collectd", "hostname", cfy.Collectd.Hostname)
6869
}

cmd/mq_influx/config.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ type mqExporterConfigYaml struct {
5050
Global cf.ConfigYGlobal
5151
Connection cf.ConfigYConnection
5252
Objects cf.ConfigYObjects
53+
Filters cf.ConfigYFilters
5354
Influx ConfigYInflux `yaml:"influx"`
5455
}
5556

@@ -80,7 +81,7 @@ func initConfig() error {
8081
if config.cf.ConfigFile != "" {
8182
err = cf.ReadConfigFile(config.cf.ConfigFile, &cfy)
8283
if err == nil {
83-
cf.CopyYamlConfig(&config.cf, cfy.Global, cfy.Connection, cfy.Objects)
84+
cf.CopyYamlConfig(&config.cf, cfy.Global, cfy.Connection, cfy.Objects, cfy.Filters)
8485
config.ci.BucketName = cf.CopyParmIfNotSetStr("influx", "bucketName", cfy.Influx.BucketName)
8586
//config.ci.DatabaseName = cf.CopyParmIfNotSetStr("influx", "databaseName", cfy.Influx.DatabaseName)
8687
config.ci.DatabaseAddress = cf.CopyParmIfNotSetStr("influx", "databaseAddress", cfy.Influx.DatabaseAddress)

cmd/mq_json/config.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ type mqExporterConfigYaml struct {
3737
Global cf.ConfigYGlobal
3838
Connection cf.ConfigYConnection
3939
Objects cf.ConfigYObjects
40+
Filters cf.ConfigYFilters
4041
JSON ConfigYJson `yaml:"json"`
4142
}
4243

@@ -60,7 +61,7 @@ func initConfig() error {
6061
if config.cf.ConfigFile != "" {
6162
err = cf.ReadConfigFile(config.cf.ConfigFile, &cfy)
6263
if err == nil {
63-
cf.CopyYamlConfig(&config.cf, cfy.Global, cfy.Connection, cfy.Objects)
64+
cf.CopyYamlConfig(&config.cf, cfy.Global, cfy.Connection, cfy.Objects, cfy.Filters)
6465
config.interval = cf.CopyParmIfNotSetStr("json", "interval", cfy.JSON.Interval)
6566
config.oneline = cf.CopyParmIfNotSetBool("json", "oneline", cfy.JSON.OneLine)
6667
}

cmd/mq_opentsdb/config.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ type mqExporterConfigYaml struct {
4343
Global cf.ConfigYGlobal
4444
Connection cf.ConfigYConnection
4545
Objects cf.ConfigYObjects
46+
Filters cf.ConfigYFilters
4647
OpenTSDB ConfigYOpenTSDB `yaml:"opentsdb"`
4748
}
4849

@@ -69,7 +70,7 @@ func initConfig() error {
6970
if config.cf.ConfigFile != "" {
7071
err = cf.ReadConfigFile(config.cf.ConfigFile, &cfy)
7172
if err == nil {
72-
cf.CopyYamlConfig(&config.cf, cfy.Global, cfy.Connection, cfy.Objects)
73+
cf.CopyYamlConfig(&config.cf, cfy.Global, cfy.Connection, cfy.Objects, cfy.Filters)
7374
config.ci.DatabaseAddress = cf.CopyParmIfNotSetStr("opentsdb", "databaseAddress", cfy.OpenTSDB.DatabaseAddress)
7475
config.ci.Interval = cf.CopyParmIfNotSetStr("opentsdb", "interval", cfy.OpenTSDB.Interval)
7576
config.ci.MaxErrors = cf.CopyParmIfNotSetInt("opentsdb", "maxErrors", cfy.OpenTSDB.MaxErrors)

cmd/mq_opentsdb/exporter.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ func Collect() error {
224224
series = "queue"
225225
usage := ""
226226
if usageAttr, ok := mqmetric.GetObjectStatus("", mqmetric.OT_Q).Attributes[mqmetric.ATTR_Q_USAGE].Values[key]; ok {
227-
if usageAttr.ValueInt64 == 1 {
227+
if usageAttr.ValueInt64 == int64(ibmmq.MQUS_TRANSMISSION) {
228228
usage = "XMITQ"
229229
} else {
230230
usage = "NORMAL"
@@ -302,7 +302,7 @@ func Collect() error {
302302
tags["platform"] = platformString
303303
usage := ""
304304
if usageAttr, ok := mqmetric.GetObjectStatus("", mqmetric.OT_Q).Attributes[mqmetric.ATTR_Q_USAGE].Values[key]; ok {
305-
if usageAttr.ValueInt64 == 1 {
305+
if usageAttr.ValueInt64 == int64(ibmmq.MQUS_TRANSMISSION) {
306306
usage = "XMITQ"
307307
} else {
308308
usage = "NORMAL"

0 commit comments

Comments
 (0)