Skip to content

Commit

Permalink
mqmetric - handle empty QueueSubFilter options
Browse files Browse the repository at this point in the history
  • Loading branch information
ibmmqmet committed Nov 8, 2023
1 parent 7c3d21e commit a0c1e63
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog
Newest updates are at the top of this file.

## Nov 08 2023 - v5.5.2
- ibmmq - #204 data race fix
- mqmetric - deal with empty QueueSubFilter option

## Oct 19 2023 - v5.5.1
- Update for MQ 9.3.4
- ibmmq - Support for new CSP JWT Token field
Expand Down
16 changes: 10 additions & 6 deletions mqmetric/discover.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,13 @@ func discoverAndSubscribe(dc DiscoverConfig, redo bool) error {
// If you are using publications for some resource metrics, but have chosen not to collect the topics that might contain queue depth,
// then there's still a possibility to find that particular value from QSTATUS responses as an alternative. The SubscriptionSelector has had
// two topics, depending on the MQ version, which give the depth.
if !strings.Contains(dc.MonitoredQueues.SubscriptionSelector, "GENERAL") && !strings.Contains(dc.MonitoredQueues.SubscriptionSelector, "GET") {
subSel := dc.MonitoredQueues.SubscriptionSelector
if subSel != "" && !strings.Contains(subSel, "GENERAL") && !strings.Contains(subSel, "GET") {
logDebug("Setting connection to grab qdepth via QSTATUS")
ci.useDepthFromStatus = true
} else {
logDebug("Setting connection to grab qdepth via Publication")
ci.useDepthFromStatus = false
}

traceExitErr("discoverAndSubscribe", 0, err)
Expand Down Expand Up @@ -409,12 +413,12 @@ func discoverClasses(dc DiscoverConfig, metaPrefix string) error {
return e2
}
}
// - The Native HA metrics introduced in MQ 9.2.3 are not currently tested for metric name maps
// and might need additional configuration to fill in an object name
// - The STATAPP metrics are not very useful yet as they only work for apps known at subscription
// time. As well as needing additional configuration.

// The STATAPP metrics are not very useful as they only work for apps known at subscription
// time. As well as needing additional configuration.
// So we ignore these for now, but might enable them in future. Adding them to the subscription
// list by default would increase the handles in use without benefit.
// list by default would increase the handles in use without benefit. We do now support use of the
// NativeHA resources
switch cl.Name {
case "STATAPP":
logDebug("Not subscribing to Class STATAPP resources")
Expand Down
2 changes: 1 addition & 1 deletion mqmetric/metrics.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Metrics published on system topics
----------------------------------

The metrics published by the queue manager under the $SYS topic tree are listed here as extracted from
the product documentation at https://www.ibm.com/docs/en/ibm-mq/latest?topic=trace-metrics-published-system-topics.
the product documentation at https://www.ibm.com/docs/en/ibm-mq/latest?topic=trace-metrics-published-system-topics.

Access to these metrics requires the "usePublications" configuration attribute to be set for the collector.

Expand Down

0 comments on commit a0c1e63

Please sign in to comment.