Skip to content

Commit 939c016

Browse files
committed
* Pull in latest mq-golang package
* Update DEPRECATIONS file
1 parent ccf6321 commit 939c016

File tree

22 files changed

+247
-126
lines changed

22 files changed

+247
-126
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
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+
## Nov 12 2025 - v5.6.7
5+
* Pull in latest mq-golang package
6+
* Add DEPRECATIONS file
7+
48
### Nov 03 2025 (v5.6.6)
59
* Pull in fix for #440
610

DEPRECATIONS.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
11
# Deprecration Notices
22

3-
## 2025-11-05
4-
* I expect that at the next full update of this repo (probably to coincide with the next MQ LTS release),
5-
some of the lesser-used collectors will be removed: aws, influx, opentsdb being most likely.
3+
This file lists features that are being considered for removal or for a breaking configuration change in the
4+
`mq-metric-samples` repository.
5+
6+
## Nov 2025
7+
8+
Note that these deprecated features will prompt a major version change in this repository. That will mean it no
9+
longer has the same version number as the underlying `mq-golang` packages.
10+
11+
The update of this repo where these take effect will probably coincide with the next MQ LTS release.
12+
13+
* Some of the lesser-used collectors will be removed: aws, influx, opentsdb being most likely.
614
* The growing use of OpenTelemetry means that format/protocol can be used in many scenarios where you might
715
previously have needed a specific client.
816

9-
* I also expect to change the Prometheus collector's default value of the `overrideCType` attribute at the
10-
same time, to more accurately reflect the different between Counters and Gauges. That may mean reworking
11-
some of your dashboards.
17+
* The Prometheus collector's default value of the `overrideCType` attribute will change to `true`, to
18+
more accurately reflect the difference between Counters and Gauges. That may mean reworking some of your dashboards.
19+
20+
* The `useObjectStatus` configuration attribute will be removed and will effectively be permanently enabled because a
21+
number of other capabilities essentially require it to be active. Instead, configuration of the monitored objects
22+
(channels, topics etc) can be independently controlled if you wish to reduce the number of `DIS xxSTATUS` commands
23+
issued.

TUNING.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,16 @@ The `global.pollInterval` and `global.rediscoverInterval` options may help to fu
9595

9696
The first of these controls how frequently the `DISPLAY xxSTATUS` commands are used, assuming the
9797
`global.useObjectStatus` is `true`. In some circumstances, you might not want all of the responses as regularly as the
98-
published metrics are handled.
98+
published metrics are handled. The queue and queue manager status is always collected during this phase regardless of
99+
the `global.useObjectStatus` setting.
99100

100101
The second attribute controls how frequently the collector reassesses the list of objects to be monitored, and their
101102
more stable attributes. For example, the `DESCRIPTION` or `MAXDEPTH` settings on a queue. If you have a large number of
102103
queues that do not change frequently, then you might want to increase the rediscovery attribute. The default is 1 hour.
103104
The tradeoff here is that newly-defined queues may not have any metrics reported until this interval expires.
104105

105106
The messages created by the queue manager ought to be non-persistent. There is no real value in preserving them across a
106-
restart. Check that the model queues, or explicitly-configured reply queues, have `DEFPSIST(NO)`.
107+
restart. Check that the configured reply queues, whether model or local queues, have `DEFPSIST(NO)`.
107108

108109
## Dividing the workload
109110
One further approach that you might like to consider, though I wouldn't usually recommend it, is to have two or more

amqsevtg/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.23.0
55
toolchain go1.24.1
66

77
require (
8-
github.com/ibm-messaging/mq-golang/v5 v5.6.6
8+
github.com/ibm-messaging/mq-golang/v5 v5.6.7
99
go.opentelemetry.io/contrib/bridges/otelslog v0.8.0
1010
go.opentelemetry.io/otel v1.33.0
1111
go.opentelemetry.io/otel/exporters/otlp/otlplog/otlploggrpc v0.9.0

amqsevtg/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
1515
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
1616
github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 h1:TmHmbvxPmaegwhDubVz0lICL0J5Ka2vwTzhoePEXsGE=
1717
github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0/go.mod h1:qztMSjm835F2bXf+5HKAPIS5qsmQDqZna/PgVt4rWtI=
18-
github.com/ibm-messaging/mq-golang/v5 v5.6.6 h1:FoDXqyztZiBOkBR376QjTK/CAHYiYLYYgzALDa1jpNs=
19-
github.com/ibm-messaging/mq-golang/v5 v5.6.6/go.mod h1:xCV0vl1+ik3VyWZnwAj++2J89vSTzhXP1gXhG0X3IYE=
18+
github.com/ibm-messaging/mq-golang/v5 v5.6.7 h1:W3znJiUb9WlzgH8/RuD8SXKmRuJz8RXc3nTEDsCrN0E=
19+
github.com/ibm-messaging/mq-golang/v5 v5.6.7/go.mod h1:xCV0vl1+ik3VyWZnwAj++2J89vSTzhXP1gXhG0X3IYE=
2020
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
2121
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
2222
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=

cmd/mq_aws/exporter.go

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,28 @@ func Collect() error {
122122

123123
pollError := err
124124
if pollStatus {
125-
if config.cf.CC.UseStatus {
126-
err := mqmetric.CollectChannelStatus(config.cf.MonitoredChannels)
125+
126+
// Always collect the queue and qmgr status info regardless of the UseStatus flag, so that we keep
127+
// the known attribute values for tagging.
128+
if err == nil {
129+
err = mqmetric.CollectQueueStatus(config.cf.MonitoredQueues)
130+
if err != nil {
131+
log.Errorf("Error collecting queue status: %v", err)
132+
pollError = err
133+
} else {
134+
log.Debugf("Collected all queue status")
135+
}
136+
err = mqmetric.CollectQueueManagerStatus()
137+
if err != nil {
138+
log.Errorf("Error collecting queue manager status: %v", err)
139+
pollError = err
140+
} else {
141+
log.Debugf("Collected all queue manager status")
142+
}
143+
}
144+
145+
if config.cf.CC.UseStatus && err == nil {
146+
err = mqmetric.CollectChannelStatus(config.cf.MonitoredChannels)
127147
if err != nil {
128148
log.Errorf("Error collecting channel status: %v", err)
129149
pollError = err
@@ -147,14 +167,6 @@ func Collect() error {
147167
log.Debugf("Collected all subscription status")
148168
}
149169

150-
err = mqmetric.CollectQueueStatus(config.cf.MonitoredQueues)
151-
if err != nil {
152-
log.Errorf("Error collecting queue status: %v", err)
153-
pollError = err
154-
} else {
155-
log.Debugf("Collected all queue status")
156-
}
157-
158170
err = mqmetric.CollectClusterStatus()
159171
if err != nil {
160172
log.Errorf("Error collecting cluster status: %v", err)
@@ -163,14 +175,6 @@ func Collect() error {
163175
log.Debugf("Collected all cluster status")
164176
}
165177

166-
err = mqmetric.CollectQueueManagerStatus()
167-
if err != nil {
168-
log.Errorf("Error collecting queue manager status: %v", err)
169-
pollError = err
170-
} else {
171-
log.Debugf("Collected all queue manager status")
172-
}
173-
174178
if mqmetric.GetPlatform() == ibmmq.MQPL_ZOS {
175179
err = mqmetric.CollectUsageStatus()
176180
if err != nil {

cmd/mq_coll/exporter.go

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,28 @@ func Collect() error {
9090
// status, then do that collection too
9191
pollError := err
9292
if pollStatus {
93-
if config.cf.CC.UseStatus {
93+
94+
// Always collect the queue and qmgr status info regardless of the UseStatus flag, so that we keep
95+
// the known attribute values for tagging.
96+
if err == nil {
97+
err = mqmetric.CollectQueueStatus(config.cf.MonitoredQueues)
98+
if err != nil {
99+
log.Errorf("Error collecting queue status: %v", err)
100+
pollError = err
101+
} else {
102+
log.Debugf("Collected all queue status")
103+
}
94104
err = mqmetric.CollectQueueManagerStatus()
95105
if err != nil {
96106
log.Errorf("Error collecting queue manager status: %v", err)
97107
pollError = err
98108
} else {
99109
log.Debugf("Collected all queue manager status")
100110
}
111+
}
112+
113+
if config.cf.CC.UseStatus && err == nil {
114+
101115
err = mqmetric.CollectChannelStatus(config.cf.MonitoredChannels)
102116
if err != nil {
103117
log.Errorf("Error collecting channel status: %v", err)
@@ -127,14 +141,6 @@ func Collect() error {
127141
log.Debugf("Collected all cluster status")
128142
}
129143

130-
err = mqmetric.CollectQueueStatus(config.cf.MonitoredQueues)
131-
if err != nil {
132-
log.Errorf("Error collecting queue status: %v", err)
133-
pollError = err
134-
} else {
135-
log.Debugf("Collected all queue status")
136-
}
137-
138144
if mqmetric.GetPlatform() == ibmmq.MQPL_ZOS {
139145
err = mqmetric.CollectUsageStatus()
140146
if err != nil {

cmd/mq_influx/exporter.go

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,26 @@ func Collect(c client.Client) error {
101101
pollError := err
102102

103103
if pollStatus {
104-
if config.cf.CC.UseStatus {
104+
// Always collect the queue and qmgr status info regardless of the UseStatus flag, so that we keep
105+
// the known attribute values for tagging.
106+
if err == nil {
107+
err = mqmetric.CollectQueueStatus(config.cf.MonitoredQueues)
108+
if err != nil {
109+
log.Errorf("Error collecting queue status: %v", err)
110+
pollError = err
111+
} else {
112+
log.Debugf("Collected all queue status")
113+
}
114+
err = mqmetric.CollectQueueManagerStatus()
115+
if err != nil {
116+
log.Errorf("Error collecting queue manager status: %v", err)
117+
pollError = err
118+
} else {
119+
log.Debugf("Collected all queue manager status")
120+
}
121+
}
122+
123+
if config.cf.CC.UseStatus && err == nil {
105124
err = mqmetric.CollectChannelStatus(config.cf.MonitoredChannels)
106125
if err != nil {
107126
log.Errorf("Error collecting channel status: %v", err)
@@ -124,14 +143,6 @@ func Collect(c client.Client) error {
124143
log.Debugf("Collected all subscription status")
125144
}
126145

127-
err = mqmetric.CollectQueueStatus(config.cf.MonitoredQueues)
128-
if err != nil {
129-
log.Errorf("Error collecting queue status: %v", err)
130-
pollError = err
131-
} else {
132-
log.Debugf("Collected all queue status")
133-
}
134-
135146
err = mqmetric.CollectClusterStatus()
136147
if err != nil {
137148
log.Errorf("Error collecting cluster status: %v", err)
@@ -170,13 +181,6 @@ func Collect(c client.Client) error {
170181
}
171182
}
172183

173-
err = mqmetric.CollectQueueManagerStatus()
174-
if err != nil {
175-
log.Errorf("Error collecting queue manager status: %v", err)
176-
pollError = err
177-
} else {
178-
log.Debugf("Collected all queue manager status")
179-
}
180184
err = pollError
181185
}
182186

cmd/mq_json/exporter.go

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,28 @@ func Collect() error {
110110
pollError := err
111111

112112
if pollStatus {
113-
if config.cf.CC.UseStatus {
114-
err := mqmetric.CollectQueueManagerStatus()
113+
114+
// Always collect the queue and qmgr status info regardless of the UseStatus flag, so that we keep
115+
// the known attribute values for tagging.
116+
if err == nil {
117+
err = mqmetric.CollectQueueStatus(config.cf.MonitoredQueues)
118+
if err != nil {
119+
log.Errorf("Error collecting queue status: %v", err)
120+
pollError = err
121+
} else {
122+
log.Debugf("Collected all queue status")
123+
}
124+
err = mqmetric.CollectQueueManagerStatus()
115125
if err != nil {
116126
log.Errorf("Error collecting queue manager status: %v", err)
117127
pollError = err
118128
} else {
119129
log.Debugf("Collected all queue manager status")
120130
}
131+
}
132+
133+
if config.cf.CC.UseStatus && err == nil {
134+
121135
err = mqmetric.CollectChannelStatus(config.cf.MonitoredChannels)
122136
if err != nil {
123137
log.Errorf("Error collecting channel status: %v", err)
@@ -140,14 +154,6 @@ func Collect() error {
140154
log.Debugf("Collected all subscription status")
141155
}
142156

143-
err = mqmetric.CollectQueueStatus(config.cf.MonitoredQueues)
144-
if err != nil {
145-
log.Errorf("Error collecting queue status: %v", err)
146-
pollError = err
147-
} else {
148-
log.Debugf("Collected all queue status")
149-
}
150-
151157
err = mqmetric.CollectClusterStatus()
152158
if err != nil {
153159
log.Errorf("Error collecting cluster status: %v", err)

cmd/mq_opentsdb/exporter.go

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,27 @@ func Collect() error {
109109

110110
pollError := err
111111
if pollStatus {
112+
// Always collect the queue and qmgr status info regardless of the UseStatus flag, so that we keep
113+
// the known attribute values for tagging.
114+
if err == nil {
115+
err = mqmetric.CollectQueueStatus(config.cf.MonitoredQueues)
116+
if err != nil {
117+
log.Errorf("Error collecting queue status: %v", err)
118+
pollError = err
119+
} else {
120+
log.Debugf("Collected all queue status")
121+
}
122+
err = mqmetric.CollectQueueManagerStatus()
123+
if err != nil {
124+
log.Errorf("Error collecting queue manager status: %v", err)
125+
pollError = err
126+
} else {
127+
log.Debugf("Collected all queue manager status")
128+
}
129+
}
130+
112131
if config.cf.CC.UseStatus {
113-
err := mqmetric.CollectChannelStatus(config.cf.MonitoredChannels)
132+
err = mqmetric.CollectChannelStatus(config.cf.MonitoredChannels)
114133
if err != nil {
115134
log.Errorf("Error collecting channel status: %v", err)
116135
pollError = err

0 commit comments

Comments
 (0)