Skip to content

Commit d43cd78

Browse files
committed
Pick up latest mq-golang fixes
1 parent bf576da commit d43cd78

File tree

16 files changed

+66
-557
lines changed

16 files changed

+66
-557
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 08 2023 (v5.5.2)
5+
* Pick up latest mq-golang fixes
6+
47
### Oct 19 2023 (v5.5.1)
58
* Update to MQ 9.3.4
69
* Fix Prometheus label cardinality when reporting disconnect (#245)

TUNING.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
If you have a large queue manager - perhaps several thousands of queues - then a lot of data could be produced for
44
monitoring those queues. Some default configuration options might need tuning to get acceptable performance. Reducing
5-
the frequency of generation and/or collection may be appropriate. There may be several places where tuning might be
5+
the frequency of generation and/or collection may be appropriate. There are several places where tuning might be
66
done: in this collector, in the database configuration, and in the queue manager.
77

88
The following sections describe different pieces that you might want to look at.
@@ -20,20 +20,20 @@ If you cannot avoid running as a client (for example, you are trying to monitor
2020
network latency between the queue manager and collector as low as possible. For z/OS, you might consider running the
2121
collector in a zLinux LPAR on the same machine. Or perhaps in a zCX container.
2222

23-
Also configure the client to take advantage of readahead when getting publications. This is done by setting
24-
`DEFREADA(YES)` on the nominated ReplyQueue(s).
23+
If you are running as a client, then configure it to take advantage of readahead when getting publications. This is done by
24+
setting `DEFREADA(YES)` on the nominated ReplyQueue(s).
2525

2626
## Collection processing time
2727
The collector reports on how long it takes to collect and process the data on each interval. You can see this in a debug
2828
log. The Prometheus collector also has a `ibmmq_qmgr_exporter_collection_time` metric. Note that this time is the value
29-
as seen by the main collection thread; the real total time as seen by Prometheus is usually longer. There is likely
30-
still work going on in the background to send metrics to the database, and for it to be successfully ingested.
29+
as seen by the main collection thread; the real total time as seen by Prometheus is usually longer. This is because there
30+
is likely still work going on in the background to send metrics to the database, and for it to be successfully ingested.
3131

3232
The first time that the collection time exceeds the Prometheus default `scrape_timeout` value, a warning message is
3333
emitted. This can be ignored if you are expecting a scrape to take a longer period. But it can be helpful if you didn't
3434
know that you might need to do some tuning.
3535

36-
The true total time taken for a scrape can be seen in Prometheus directly. For example, you can use the admininistrative
36+
The true total time taken for a scrape can be seen in Prometheus directly. For example, you can use the administrative
3737
interface at `http://<server>:9090/targets?search=` and find the target corresponding to your queue manager.
3838

3939
For other collectors, there is no specific metric. But the timestamps on each collection block allow you to deduce the

cp4i/README.md

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@
22

33
## Using sample yamls
44

5-
This directory contains sample files that show how to deploy the Prometheus
6-
monitor to expose queue metrics for a queue manager running in a Cloud Pak for
7-
Integration deployment on Red Hat OpenShift. The samples are accompanied by the blog post
8-
[Monitoring IBM MQ queue depth in Cloud Pak for Integration](https://community.ibm.com/community/user/integration/blogs/matt-roberts1/2021/05/03/monitoring-mq-qdepth-cp4i) which provides a worked tutorial
9-
illustrating how to implement monitoring scenarios in a Cloud Pak for Integration deployment.
10-
11-
The MQ Certified Container that comes in the Cloud Pak for Integration
12-
emits a range of [queue manager (server) scope metrics](https://www.ibm.com/docs/en/ibm-mq/9.2?topic=containers-metrics-published-by-mq-certified) but does not currently offer an option to
13-
publish information about queues or topics, so use of an additional Prometheus monitor pod as
14-
shown below allows queue (and topic) metrics to be published to Prometheus for consumption
15-
by OpenShift monitoring tools.
5+
This directory contains sample files that show how to deploy the Prometheus monitor to expose queue metrics for a queue
6+
manager running in a Cloud Pak for Integration deployment on Red Hat OpenShift. The samples are accompanied by the blog
7+
post
8+
[Monitoring IBM MQ queue depth in Cloud Pak for Integration](https://community.ibm.com/community/user/integration/blogs/matt-roberts1/2021/05/03/monitoring-mq-qdepth-cp4i)
9+
which provides a worked tutorial illustrating how to implement monitoring scenarios in a Cloud Pak for Integration
10+
deployment.
11+
12+
The MQ Certified Container that comes in the Cloud Pak for Integration emits a range of
13+
[queue manager (server) scope metrics](https://www.ibm.com/docs/en/ibm-mq/latest?topic=operator-metrics-published-when-using-mq)
14+
but does not currently offer an option to publish information about queues or topics, so use of an additional Prometheus
15+
monitor pod as shown below allows queue (and topic) metrics to be published to Prometheus for consumption by OpenShift
16+
monitoring tools.
1617

1718
The steps to do this are as follows;
1819

@@ -22,8 +23,8 @@ cd mq-metric-samples/scripts
2223
./buildRuntime.sh mq_prometheus
2324
2425
# Tag and push the Docker image to the container registry used by your OpenShift cluster
25-
docker tag mq-metric-prometheus:5.2.0 your.repo/your-namespace/mq-metric-prometheus:1.0
26-
docker push your.repo/your-namespace/mq-metric-prometheus:1.0
26+
docker tag mq-metric-prometheus:5.2.0 your.repo/your-namespace/mq-metric-prometheus:1.0 docker push
27+
your.repo/your-namespace/mq-metric-prometheus:1.0
2728
2829
# Create a ConfigMap and Secret to configure the settings that you wish to apply to your monitor.
2930
# Update these to suit your requirements
@@ -68,9 +69,8 @@ oc apply -f ./metrics-service.yaml
6869
```
6970

7071

71-
Once the metrics pod is deployed you can see it in action by looking at the logs
72-
for the pod, and the "IBMMQ Collect" statements showing that the metrics are being
73-
scraped by the Prometheus agent running in your OpenShift cluster.
72+
Once the metrics pod is deployed you can see it in action by looking at the logs for the pod, and the "IBMMQ Collect"
73+
statements showing that the metrics are being scraped by the Prometheus agent running in your OpenShift cluster.
7474
```
7575
oc logs mq-metric-prometheus
7676
@@ -93,8 +93,7 @@ time="2021-04-13T20:13:55Z" level=info msg="Collection time = 0 secs"
9393

9494
## Helm Charts
9595

96-
The `chart` directory contains all the helm charts needed to deploy the set of resources
97-
on an OpenShift cluster.
96+
The `chart` directory contains all the helm charts needed to deploy the set of resources on an OpenShift cluster.
9897

99-
In this case the pod is wrapped in a deployment resource and an OpenShift route is added
100-
to provide access to the metrics application.
98+
In this case the pod is wrapped in a deployment resource and an OpenShift route is added to provide access to the
99+
metrics application.

dspmqrtj/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Other dependencies are included in the `vendor` tree or can be refreshed with th
1717

1818
## How to use it
1919

20-
It is similar to **dspmqrte** - [here](https://www.ibm.com/docs/en/ibm-mq/9.2?topic=reference-dspmqrte-display-route-information)
20+
It is similar to **dspmqrte** - [here](https://www.ibm.com/docs/en/ibm-mq/latest?topic=reference-dspmqrte-display-route-information)
2121
is that program's documentation - but without all of the options. I wanted to just get to the basics of displaying the
2222
route. At its simplest, you can
2323
run `dspmqrtj -m QM1 -q LOOP.ALIAS` where the designated queue happens to be the start of a chain.

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.17
44

55
require (
6-
github.com/ibm-messaging/mq-golang/v5 v5.5.1
6+
github.com/ibm-messaging/mq-golang/v5 v5.5.2
77
github.com/sirupsen/logrus v1.9.3
88
golang.org/x/crypto v0.14.0
99
)

dspmqrtj/go.sum

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,22 @@
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.5.1 h1:osHsjgUk0RwGJaSZlAAl0lLy/roUvjgP5Vtsv1bx0/g=
5-
github.com/ibm-messaging/mq-golang/v5 v5.5.1/go.mod h1:NELV8CYOIIH1QmY6pPvulRKjwuih9YAIL9rg8+UNzNw=
4+
github.com/ibm-messaging/mq-golang/v5 v5.5.2 h1:wigp/rO7j975R79rR8geyAtYJFktdexFsTuzbQ4FgY0=
5+
github.com/ibm-messaging/mq-golang/v5 v5.5.2/go.mod h1:NELV8CYOIIH1QmY6pPvulRKjwuih9YAIL9rg8+UNzNw=
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=
99
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
1010
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
1111
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
1212
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
13-
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
14-
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
15-
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
1613
golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc=
1714
golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4=
18-
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
19-
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
20-
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
21-
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
22-
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
23-
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
24-
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
25-
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
26-
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
27-
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
28-
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
29-
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
30-
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
31-
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
3215
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
33-
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
34-
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
35-
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
3616
golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE=
3717
golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
38-
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
39-
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
40-
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
41-
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
4218
golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek=
4319
golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U=
44-
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
45-
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
46-
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
47-
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
48-
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
49-
golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
50-
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
51-
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
52-
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
53-
golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
54-
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
5520
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
5621
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
5722
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

dspmqrtj/vendor/github.com/ibm-messaging/mq-golang/v5/ibmmq/mqiattrs.go

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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.5.1
1+
# github.com/ibm-messaging/mq-golang/v5 v5.5.2
22
## explicit; go 1.16
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
@@ -4,7 +4,7 @@ go 1.17
44

55
require (
66
github.com/aws/aws-sdk-go v1.45.19
7-
github.com/ibm-messaging/mq-golang/v5 v5.5.1
7+
github.com/ibm-messaging/mq-golang/v5 v5.5.2
88
github.com/influxdata/influxdb-client-go/v2 v2.12.3
99
github.com/prometheus/client_golang v1.17.0
1010
github.com/sirupsen/logrus v1.9.3

0 commit comments

Comments
 (0)