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 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" } }