From dab07c61e88720130f8bfe2916a4ff27fbda39a9 Mon Sep 17 00:00:00 2001 From: Steven Soroka Date: Mon, 27 Jul 2020 16:07:15 -0400 Subject: [PATCH] jolokia: add some error message context (#7906) --- plugins/inputs/jolokia2/gatherer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/inputs/jolokia2/gatherer.go b/plugins/inputs/jolokia2/gatherer.go index 5b2aa00d8..f24918998 100644 --- a/plugins/inputs/jolokia2/gatherer.go +++ b/plugins/inputs/jolokia2/gatherer.go @@ -88,8 +88,8 @@ func (g *Gatherer) generatePoints(metric Metric, responses []ReadResponse) ([]po case 404: continue default: - errors = append(errors, fmt.Errorf("Unexpected status in response from target %s: %d", - response.RequestTarget, response.Status)) + errors = append(errors, fmt.Errorf("Unexpected status in response from target %s (%q): %d", + response.RequestTarget, response.RequestMbean, response.Status)) continue }