From 07c7c4ac573b2d3b1c539d543f529a4e96b80f6b Mon Sep 17 00:00:00 2001 From: ibmmqmet Date: Tue, 23 Oct 2018 09:54:29 +0100 Subject: [PATCH 1/2] Heuristic for metric names was creating duplicates --- mqmetric/discover.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mqmetric/discover.go b/mqmetric/discover.go index c8095d3..f7ec1c7 100755 --- a/mqmetric/discover.go +++ b/mqmetric/discover.go @@ -681,8 +681,14 @@ func formatDescription(elem *MonElement) string { } else if strings.Contains(s, "log_") { /* Weird case where the log datatype is not MB or GB but should be bytes */ s = s + "_bytes" - } else { - s = s + "_count" + } + + // There are some metrics that have both "count" and "byte count" in + // the descriptions. They were getting mapped to the same string, so + // we have to ensure uniqueness. We do not put "_count" on the + // metric name. + if (strings.Contains(elem.Description,"byte count")) { + s = s + "_bytes" } } From ba0304fbde852ad452220cc02e684de8024eb656 Mon Sep 17 00:00:00 2001 From: ibmmqmet Date: Tue, 23 Oct 2018 09:57:31 +0100 Subject: [PATCH 2/2] Update CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c54dc79..4dca26a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ # Changelog + +## October 2018 +* Corrected heuristic for generating metric names + ## August 2018 * Added V9.1 constant definitions * Updated build comments