Skip to content

Commit 21ef0b3

Browse files
committed
Update to latest mq-golang level
1 parent 0c345f9 commit 21ef0b3

File tree

14 files changed

+127
-109
lines changed

14 files changed

+127
-109
lines changed

CHANGELOG.md

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

4+
### Nov 03 2025 (v5.6.6)
5+
* Pull in fix for #440
6+
47
### Oct 16 2025 (v5.6.5)
58
* Update to MQ 9.4.4
69
* Add showCustomAttribute filter config setting to include the CUSTOM attribute as metric tag/label

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.5
8+
github.com/ibm-messaging/mq-golang/v5 v5.6.6
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.5 h1:AkOetf9pFAqLrg6dsBVyycHGjgkZAiJBrzEZ6C9hjuo=
19-
github.com/ibm-messaging/mq-golang/v5 v5.6.5/go.mod h1:xCV0vl1+ik3VyWZnwAj++2J89vSTzhXP1gXhG0X3IYE=
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=
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: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -162,45 +162,45 @@ func Collect() error {
162162
} else {
163163
log.Debugf("Collected all cluster status")
164164
}
165-
}
166-
167-
err = mqmetric.CollectQueueManagerStatus()
168-
if err != nil {
169-
log.Errorf("Error collecting queue manager status: %v", err)
170-
pollError = err
171-
} else {
172-
log.Debugf("Collected all queue manager status")
173-
}
174165

175-
if mqmetric.GetPlatform() == ibmmq.MQPL_ZOS {
176-
err = mqmetric.CollectUsageStatus()
166+
err = mqmetric.CollectQueueManagerStatus()
177167
if err != nil {
178-
log.Errorf("Error collecting bufferpool/pageset status: %v", err)
168+
log.Errorf("Error collecting queue manager status: %v", err)
179169
pollError = err
180170
} else {
181-
log.Debugf("Collected all buffer pool/pageset status")
171+
log.Debugf("Collected all queue manager status")
182172
}
183-
} else {
184-
if config.cf.MonitoredAMQPChannels != "" {
185-
err = mqmetric.CollectAMQPChannelStatus(config.cf.MonitoredAMQPChannels)
173+
174+
if mqmetric.GetPlatform() == ibmmq.MQPL_ZOS {
175+
err = mqmetric.CollectUsageStatus()
186176
if err != nil {
187-
log.Errorf("Error collecting AMQP status: %v", err)
177+
log.Errorf("Error collecting bufferpool/pageset status: %v", err)
188178
pollError = err
189179
} else {
190-
log.Debugf("Collected all AMQP status")
180+
log.Debugf("Collected all buffer pool/pageset status")
181+
}
182+
} else {
183+
if config.cf.MonitoredAMQPChannels != "" {
184+
err = mqmetric.CollectAMQPChannelStatus(config.cf.MonitoredAMQPChannels)
185+
if err != nil {
186+
log.Errorf("Error collecting AMQP status: %v", err)
187+
pollError = err
188+
} else {
189+
log.Debugf("Collected all AMQP status")
190+
}
191191
}
192-
}
193192

194-
if config.cf.MonitoredMQTTChannels != "" {
195-
err = mqmetric.CollectMQTTChannelStatus(config.cf.MonitoredMQTTChannels)
196-
if err != nil {
197-
log.Errorf("Error collecting MQTT status: %v", err)
198-
pollError = err
199-
} else {
200-
log.Debugf("Collected all MQTT status")
193+
if config.cf.MonitoredMQTTChannels != "" {
194+
err = mqmetric.CollectMQTTChannelStatus(config.cf.MonitoredMQTTChannels)
195+
if err != nil {
196+
log.Errorf("Error collecting MQTT status: %v", err)
197+
pollError = err
198+
} else {
199+
log.Debugf("Collected all MQTT status")
200+
}
201201
}
202-
}
203202

203+
}
204204
err = pollError
205205
}
206206

cmd/mq_opentsdb/exporter.go

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -149,42 +149,42 @@ func Collect() error {
149149
} else {
150150
log.Debugf("Collected all cluster status")
151151
}
152-
}
153-
154-
err = mqmetric.CollectQueueManagerStatus()
155-
if err != nil {
156-
log.Errorf("Error collecting queue manager status: %v", err)
157-
pollError = err
158-
} else {
159-
log.Debugf("Collected all queue manager status")
160-
}
161152

162-
if mqmetric.GetPlatform() == ibmmq.MQPL_ZOS {
163-
err = mqmetric.CollectUsageStatus()
153+
err = mqmetric.CollectQueueManagerStatus()
164154
if err != nil {
165-
log.Errorf("Error collecting bufferpool/pageset status: %v", err)
155+
log.Errorf("Error collecting queue manager status: %v", err)
166156
pollError = err
167157
} else {
168-
log.Debugf("Collected all buffer pool/pageset status")
158+
log.Debugf("Collected all queue manager status")
169159
}
170-
} else {
171-
if config.cf.MonitoredAMQPChannels != "" {
172-
err = mqmetric.CollectAMQPChannelStatus(config.cf.MonitoredAMQPChannels)
160+
161+
if mqmetric.GetPlatform() == ibmmq.MQPL_ZOS {
162+
err = mqmetric.CollectUsageStatus()
173163
if err != nil {
174-
log.Errorf("Error collecting AMQP status: %v", err)
164+
log.Errorf("Error collecting bufferpool/pageset status: %v", err)
175165
pollError = err
176166
} else {
177-
log.Debugf("Collected all AMQP status")
167+
log.Debugf("Collected all buffer pool/pageset status")
168+
}
169+
} else {
170+
if config.cf.MonitoredAMQPChannels != "" {
171+
err = mqmetric.CollectAMQPChannelStatus(config.cf.MonitoredAMQPChannels)
172+
if err != nil {
173+
log.Errorf("Error collecting AMQP status: %v", err)
174+
pollError = err
175+
} else {
176+
log.Debugf("Collected all AMQP status")
177+
}
178178
}
179-
}
180179

181-
if config.cf.MonitoredMQTTChannels != "" {
182-
err = mqmetric.CollectMQTTChannelStatus(config.cf.MonitoredMQTTChannels)
183-
if err != nil {
184-
log.Errorf("Error collecting MQTT status: %v", err)
185-
pollError = err
186-
} else {
187-
log.Debugf("Collected all MQTT status")
180+
if config.cf.MonitoredMQTTChannels != "" {
181+
err = mqmetric.CollectMQTTChannelStatus(config.cf.MonitoredMQTTChannels)
182+
if err != nil {
183+
log.Errorf("Error collecting MQTT status: %v", err)
184+
pollError = err
185+
} else {
186+
log.Debugf("Collected all MQTT status")
187+
}
188188
}
189189
}
190190
err = pollError

cmd/mq_prometheus/exporter.go

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -379,60 +379,60 @@ func (e *exporter) Collect(ch chan<- prometheus.Metric) {
379379
log.Debugf("Collected all queue status")
380380
}
381381
}
382-
}
383-
384-
if err == nil {
385-
err = mqmetric.CollectQueueManagerStatus()
386-
if err != nil {
387-
log.Errorf("Error collecting queue manager status: %v", err)
388-
pollError = err
389-
} else {
390-
log.Debugf("Collected all queue manager status")
391-
}
392-
}
393-
394-
if err == nil {
395-
err = mqmetric.CollectClusterStatus()
396-
if err != nil {
397-
log.Errorf("Error collecting cluster status: %v", err)
398-
pollError = err
399-
} else {
400-
log.Debugf("Collected all cluster status")
401-
}
402-
}
403382

404-
if err == nil && mqmetric.GetPlatform() == ibmmq.MQPL_ZOS {
405-
err = mqmetric.CollectUsageStatus()
406-
if err != nil {
407-
log.Errorf("Error collecting bufferpool/pageset status: %v", err)
408-
pollError = err
409-
} else {
410-
log.Debugf("Collected all buffer pool/pageset status")
383+
if err == nil {
384+
err = mqmetric.CollectQueueManagerStatus()
385+
if err != nil {
386+
log.Errorf("Error collecting queue manager status: %v", err)
387+
pollError = err
388+
} else {
389+
log.Debugf("Collected all queue manager status")
390+
}
411391
}
412-
}
413392

414-
if err == nil && mqmetric.GetPlatform() != ibmmq.MQPL_ZOS {
415-
if config.cf.MonitoredAMQPChannels != "" {
416-
err = mqmetric.CollectAMQPChannelStatus(config.cf.MonitoredAMQPChannels)
393+
if err == nil {
394+
err = mqmetric.CollectClusterStatus()
417395
if err != nil {
418-
log.Errorf("Error collecting AMQP channel status: %v", err)
396+
log.Errorf("Error collecting cluster status: %v", err)
419397
pollError = err
420398
} else {
421-
log.Debugf("Collected all AMQP channel status")
399+
log.Debugf("Collected all cluster status")
422400
}
423401
}
424402

425-
if config.cf.MonitoredMQTTChannels != "" {
426-
err = mqmetric.CollectMQTTChannelStatus(config.cf.MonitoredMQTTChannels)
403+
if err == nil && mqmetric.GetPlatform() == ibmmq.MQPL_ZOS {
404+
err = mqmetric.CollectUsageStatus()
427405
if err != nil {
428-
log.Errorf("Error collecting MQTT channel status: %v", err)
406+
log.Errorf("Error collecting bufferpool/pageset status: %v", err)
429407
pollError = err
430408
} else {
431-
log.Debugf("Collected all MQTT channel status")
409+
log.Debugf("Collected all buffer pool/pageset status")
432410
}
433411
}
434-
}
435412

413+
if err == nil && mqmetric.GetPlatform() != ibmmq.MQPL_ZOS {
414+
if config.cf.MonitoredAMQPChannels != "" {
415+
err = mqmetric.CollectAMQPChannelStatus(config.cf.MonitoredAMQPChannels)
416+
if err != nil {
417+
log.Errorf("Error collecting AMQP channel status: %v", err)
418+
pollError = err
419+
} else {
420+
log.Debugf("Collected all AMQP channel status")
421+
}
422+
}
423+
424+
if config.cf.MonitoredMQTTChannels != "" {
425+
err = mqmetric.CollectMQTTChannelStatus(config.cf.MonitoredMQTTChannels)
426+
if err != nil {
427+
log.Errorf("Error collecting MQTT channel status: %v", err)
428+
pollError = err
429+
} else {
430+
log.Debugf("Collected all MQTT channel status")
431+
}
432+
}
433+
}
434+
435+
}
436436
}
437437
if err == nil {
438438
err = pollError

dspmqrtj/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module dspmqrtj/v5
33
go 1.24.0
44

55
require (
6-
github.com/ibm-messaging/mq-golang/v5 v5.6.5
6+
github.com/ibm-messaging/mq-golang/v5 v5.6.6
77
github.com/sirupsen/logrus v1.9.3
88
golang.org/x/term v0.36.0
99
)

dspmqrtj/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
22
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
33
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
4-
github.com/ibm-messaging/mq-golang/v5 v5.6.5 h1:AkOetf9pFAqLrg6dsBVyycHGjgkZAiJBrzEZ6C9hjuo=
5-
github.com/ibm-messaging/mq-golang/v5 v5.6.5/go.mod h1:xCV0vl1+ik3VyWZnwAj++2J89vSTzhXP1gXhG0X3IYE=
4+
github.com/ibm-messaging/mq-golang/v5 v5.6.6 h1:FoDXqyztZiBOkBR376QjTK/CAHYiYLYYgzALDa1jpNs=
5+
github.com/ibm-messaging/mq-golang/v5 v5.6.6/go.mod h1:xCV0vl1+ik3VyWZnwAj++2J89vSTzhXP1gXhG0X3IYE=
66
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
77
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
88
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=

dspmqrtj/vendor/modules.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# github.com/ibm-messaging/mq-golang/v5 v5.6.5
1+
# github.com/ibm-messaging/mq-golang/v5 v5.6.6
22
## explicit; go 1.18
33
github.com/ibm-messaging/mq-golang/v5/ibmmq
44
# github.com/sirupsen/logrus v1.9.3

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ toolchain go1.24.1
77
require (
88
github.com/aws/aws-sdk-go v1.55.8
99
github.com/go-logr/stdr v1.2.2
10-
github.com/ibm-messaging/mq-golang/v5 v5.6.5
10+
github.com/ibm-messaging/mq-golang/v5 v5.6.6
1111
github.com/influxdata/influxdb-client-go/v2 v2.14.0
1212
github.com/prometheus/client_golang v1.23.2
1313
github.com/sirupsen/logrus v1.9.3

0 commit comments

Comments
 (0)